home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 10 / BBS In A Box Volume X (AMUG) (January 1994).bin / Files / Prog / U-Z / VideoToolBox.cpt / VideoToolboxSources / VideoToolbox.h < prev    next >
MacBinary  |  1993-03-15  |  21.5 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Mar 15 23:38:53 1993, modified Mon Mar 15 23:38:53 1993, creator Think C, type ASCII, 21296 bytes "VideoToolbox.h" , at 0x53b0 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 56 69 64 65 6f 54 | 6f 6f 6c 62 6f 78 2e 68 |..VideoT|oolbox.h|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 53 30 00 | 00 01 ac a7 cb 0a 5d a7 |.....S0.|......].|
|00000060| cb 0a 5d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..].....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 63 30 00 00 |........|....c0..|
|00000080| 2f 2a 0d 56 69 64 65 6f | 54 6f 6f 6c 62 6f 78 2e |/*.Video|Toolbox.|
|00000090| 68 0d 54 68 69 73 20 66 | 69 6c 65 20 63 6f 6e 74 |h.This f|ile cont|
|000000a0| 61 69 6e 73 20 74 68 65 | 20 6e 65 63 65 73 73 61 |ains the| necessa|
|000000b0| 72 79 20 70 72 6f 74 6f | 74 79 70 65 73 20 66 6f |ry proto|types fo|
|000000c0| 72 20 75 73 65 20 6f 66 | 20 61 6c 6c 20 74 68 65 |r use of| all the|
|000000d0| 20 56 69 64 65 6f 54 6f | 6f 6c 62 6f 78 0d 66 69 | VideoTo|olbox.fi|
|000000e0| 6c 65 73 20 65 78 63 65 | 70 74 20 4c 75 6d 69 6e |les exce|pt Lumin|
|000000f0| 61 6e 63 65 2e 63 2c 20 | 77 68 69 63 68 20 68 61 |ance.c, |which ha|
|00000100| 73 20 69 74 73 20 6f 77 | 6e 20 68 65 61 64 65 72 |s its ow|n header|
|00000110| 20 66 69 6c 65 2c 20 4c | 75 6d 69 6e 61 6e 63 65 | file, L|uminance|
|00000120| 2e 68 2e 0d 0d 41 6e 79 | 20 43 20 66 69 6c 65 20 |.h...Any| C file |
|00000130| 74 68 61 74 20 6d 69 67 | 68 74 20 62 65 20 75 73 |that mig|ht be us|
|00000140| 65 64 20 61 73 20 61 20 | 4d 41 54 4c 41 42 20 66 |ed as a |MATLAB f|
|00000150| 69 6c 65 20 73 68 6f 75 | 6c 64 20 23 69 6e 63 6c |ile shou|ld #incl|
|00000160| 75 64 65 20 3c 56 69 64 | 65 6f 54 6f 6f 6c 62 6f |ude <Vid|eoToolbo|
|00000170| 78 2e 68 3e 0d 61 73 20 | 69 74 27 73 20 66 69 72 |x.h>.as |it's fir|
|00000180| 73 74 20 43 20 73 74 61 | 74 65 6d 65 6e 74 2e 0d |st C sta|tement..|
|00000190| 0d 43 6f 70 79 72 69 67 | 68 74 20 31 39 38 39 2d |.Copyrig|ht 1989-|
|000001a0| 31 39 39 33 20 a9 20 44 | 65 6e 69 73 20 47 2e 20 |1993 . D|enis G. |
|000001b0| 50 65 6c 6c 69 0d 0d 48 | 49 53 54 4f 52 59 3a 20 |Pelli..H|ISTORY: |
|000001c0| 28 6f 6d 69 74 74 69 6e | 67 20 63 68 61 6e 67 65 |(omittin|g change|
|000001d0| 73 20 64 6f 63 75 6d 65 | 6e 74 65 64 20 69 6e 20 |s docume|nted in |
|000001e0| 2a 2e 63 20 66 69 6c 65 | 73 29 0d 32 2f 32 30 2f |*.c file|s).2/20/|
|000001f0| 39 33 20 64 68 62 09 41 | 64 64 65 64 20 76 61 72 |93 dhb.A|dded var|
|00000200| 69 6f 75 73 20 63 6f 6d | 6d 6f 6e 6c 79 20 75 73 |ious com|monly us|
|00000210| 65 64 20 68 65 61 64 65 | 72 73 2e 20 20 0d 09 09 |ed heade|rs. ...|
|00000220| 09 52 65 73 74 72 75 63 | 74 75 72 65 64 20 73 6f |.Restruc|tured so|
|00000230| 20 74 68 61 74 20 6f 6e | 6c 79 20 56 69 64 65 6f | that on|ly Video|
|00000240| 54 6f 6f 6c 62 6f 78 2e | 68 20 68 61 73 20 74 6f |Toolbox.|h has to|
|00000250| 20 62 65 20 69 6e 63 6c | 75 64 65 64 2c 0d 09 09 | be incl|uded,...|
|00000260| 09 77 68 65 74 68 65 72 | 20 6f 6e 65 20 69 73 20 |.whether| one is |
|00000270| 63 72 65 61 74 69 6e 67 | 20 73 74 61 6e 64 2d 61 |creating| stand-a|
|00000280| 6c 6f 6e 65 20 54 48 49 | 4e 4b 20 43 20 6f 72 20 |lone THI|NK C or |
|00000290| 63 6f 64 65 20 72 65 73 | 6f 75 72 63 65 73 0d 09 |code res|ources..|
|000002a0| 09 09 74 6f 20 62 65 20 | 63 61 6c 6c 65 64 20 62 |..to be |called b|
|000002b0| 79 20 4d 61 74 4c 61 62 | 2e 20 45 76 65 72 79 74 |y MatLab|. Everyt|
|000002c0| 68 69 6e 67 20 74 68 61 | 74 20 63 61 72 65 73 20 |hing tha|t cares |
|000002d0| 69 73 20 70 72 6f 70 65 | 72 6c 79 20 63 6f 6e 64 |is prope|rly cond|
|000002e0| 69 74 69 6f 6e 65 64 0d | 09 09 09 62 79 20 73 79 |itioned.|...by sy|
|000002f0| 6d 62 6f 6c 20 4d 41 54 | 4c 41 42 20 6f 72 20 55 |mbol MAT|LAB or U|
|00000300| 43 53 42 2e 0d 09 09 09 | 0d 2a 2f 0d 23 70 72 61 |CSB.....|.*/.#pra|
|00000310| 67 6d 61 20 6f 6e 63 65 | 09 09 09 2f 2f 20 73 75 |gma once|...// su|
|00000320| 70 70 72 65 73 73 20 6d | 75 6c 74 69 70 6c 65 20 |ppress m|ultiple |
|00000330| 69 6e 63 6c 75 73 69 6f | 6e 73 20 6f 66 20 74 68 |inclusio|ns of th|
|00000340| 69 73 20 66 69 6c 65 0d | 23 69 66 6e 64 65 66 20 |is file.|#ifndef |
|00000350| 5f 56 49 44 45 4f 54 4f | 4f 4c 42 4f 58 5f 09 2f |_VIDEOTO|OLBOX_./|
|00000360| 2f 20 73 75 70 70 72 65 | 73 73 20 6d 75 6c 74 69 |/ suppre|ss multi|
|00000370| 70 6c 65 20 69 6e 63 6c | 75 73 69 6f 6e 73 20 6f |ple incl|usions o|
|00000380| 66 20 74 68 69 73 20 66 | 69 6c 65 0d 23 64 65 66 |f this f|ile.#def|
|00000390| 69 6e 65 20 5f 56 49 44 | 45 4f 54 4f 4f 4c 42 4f |ine _VID|EOTOOLBO|
|000003a0| 58 5f 0d 0d 2f 2a 0d 48 | 65 61 64 65 72 20 66 69 |X_../*.H|eader fi|
|000003b0| 6c 65 73 20 74 68 61 74 | 20 61 72 65 20 72 65 71 |les that| are req|
|000003c0| 75 69 72 65 64 20 66 6f | 72 20 73 75 63 63 65 73 |uired fo|r succes|
|000003d0| 66 75 6c 20 63 6f 6d 70 | 69 6c 61 74 69 6f 6e 20 |ful comp|ilation |
|000003e0| 6f 66 20 74 68 69 73 20 | 66 69 6c 65 20 61 72 65 |of this |file are|
|000003f0| 20 6d 61 72 6b 65 64 0d | 22 72 65 71 75 69 72 65 | marked.|"require|
|00000400| 64 22 2e 20 0d 0d 48 65 | 61 64 65 72 20 66 69 6c |d". ..He|ader fil|
|00000410| 65 73 20 77 68 6f 73 65 | 20 70 72 65 63 6f 6d 70 |es whose| precomp|
|00000420| 69 6c 61 74 69 6f 6e 20 | 64 65 70 65 6e 64 73 20 |ilation |depends |
|00000430| 6f 6e 20 74 68 65 20 6d | 63 36 38 38 38 31 20 6f |on the m|c68881 o|
|00000440| 72 20 6d 63 36 38 30 32 | 30 20 54 48 49 4e 4b 20 |r mc6802|0 THINK |
|00000450| 43 0d 63 6f 6d 70 69 6c | 65 72 20 6f 70 74 69 6f |C.compil|er optio|
|00000460| 6e 73 20 28 65 2e 67 2e | 20 6d 61 74 68 2e 68 20 |ns (e.g.| math.h |
|00000470| 61 6e 64 20 6d 63 36 38 | 38 38 31 2e 68 29 20 77 |and mc68|881.h) w|
|00000480| 65 72 65 20 6f 6d 69 74 | 74 65 64 20 66 72 6f 6d |ere omit|ted from|
|00000490| 20 56 69 64 65 6f 54 6f | 6f 6c 62 6f 78 2e 68 20 | VideoTo|olbox.h |
|000004a0| 73 6f 0d 74 68 61 74 20 | 74 68 65 20 72 65 73 75 |so.that |the resu|
|000004b0| 6c 74 69 6e 67 20 70 72 | 65 63 6f 6d 70 69 6c 65 |lting pr|ecompile|
|000004c0| 64 20 68 65 61 64 65 72 | 20 66 69 6c 65 20 63 61 |d header| file ca|
|000004d0| 6e 20 62 65 20 75 73 65 | 64 20 69 6e 20 70 72 6f |n be use|d in pro|
|000004e0| 6a 65 63 74 73 20 72 65 | 67 61 72 64 6c 65 73 73 |jects re|gardless|
|000004f0| 20 6f 66 0d 74 68 6f 73 | 65 20 6f 70 74 69 6f 6e | of.thos|e option|
|00000500| 73 2e 20 28 59 6f 75 27 | 6c 6c 20 77 61 6e 74 20 |s. (You'|ll want |
|00000510| 74 68 65 6d 20 65 6e 61 | 62 6c 65 64 20 69 6e 20 |them ena|bled in |
|00000520| 79 6f 75 72 20 65 78 70 | 65 72 69 6d 65 6e 74 73 |your exp|eriments|
|00000530| 20 74 6f 20 6d 61 6b 65 | 20 66 75 6c 6c 20 75 73 | to make| full us|
|00000540| 65 20 6f 66 0d 79 6f 75 | 72 20 68 61 72 64 77 61 |e of.you|r hardwa|
|00000550| 72 65 2c 20 62 75 74 20 | 79 6f 75 27 6c 6c 20 75 |re, but |you'll u|
|00000560| 73 75 61 6c 6c 79 20 77 | 61 6e 74 20 74 68 65 6d |sually w|ant them|
|00000570| 20 64 69 73 61 62 6c 65 | 64 20 69 6e 20 64 65 6d | disable|d in dem|
|00000580| 6f 20 70 72 6f 67 72 61 | 6d 73 20 66 6f 72 0d 6d |o progra|ms for.m|
|00000590| 61 78 69 6d 75 6d 20 63 | 6f 6d 70 61 74 69 62 69 |aximum c|ompatibi|
|000005a0| 6c 69 74 79 20 77 69 74 | 68 20 6f 74 68 65 72 20 |lity wit|h other |
|000005b0| 70 65 6f 70 6c 65 73 20 | 63 6f 6d 70 75 74 65 72 |peoples |computer|
|000005c0| 73 2e 29 20 48 6f 77 65 | 76 65 72 2c 20 63 68 61 |s.) Howe|ver, cha|
|000005d0| 6e 67 69 6e 67 20 6f 74 | 68 65 72 0d 6f 70 74 69 |nging ot|her.opti|
|000005e0| 6f 6e 73 20 28 65 2e 67 | 2e 20 73 69 7a 65 20 6f |ons (e.g|. size o|
|000005f0| 66 20 64 6f 75 62 6c 65 | 20 6f 72 20 73 69 7a 65 |f double| or size|
|00000600| 20 6f 66 20 69 6e 74 29 | 20 77 69 6c 6c 20 73 74 | of int)| will st|
|00000610| 69 6c 6c 20 6d 61 6b 65 | 20 69 74 20 6e 65 63 65 |ill make| it nece|
|00000620| 73 73 61 72 79 20 74 6f | 0d 72 65 62 75 69 6c 64 |ssary to|.rebuild|
|00000630| 20 74 68 65 20 70 72 65 | 63 6f 6d 70 69 6c 65 64 | the pre|compiled|
|00000640| 20 68 65 61 64 65 72 20 | 66 69 6c 65 2c 20 74 6f | header |file, to|
|00000650| 20 72 65 66 6c 65 63 74 | 20 74 68 65 20 6e 65 77 | reflect| the new|
|00000660| 20 73 65 74 74 69 6e 67 | 73 2e 0d 0d 54 68 65 20 | setting|s...The |
|00000670| 56 69 64 65 6f 54 6f 6f | 6c 62 6f 78 20 73 6f 75 |VideoToo|lbox sou|
|00000680| 72 63 65 73 20 63 61 6e | 20 62 65 20 6c 69 6e 6b |rces can| be link|
|00000690| 65 64 20 74 6f 20 63 72 | 65 61 74 65 20 61 20 73 |ed to cr|eate a s|
|000006a0| 74 61 6e 64 2d 61 6c 6f | 6e 65 20 43 20 61 70 70 |tand-alo|ne C app|
|000006b0| 6c 69 63 61 74 69 6f 6e | 2c 20 6f 72 0d 61 20 4d |lication|, or.a M|
|000006c0| 61 74 4c 61 62 20 65 78 | 74 65 72 6e 61 6c 20 63 |atLab ex|ternal c|
|000006d0| 6f 64 65 20 72 65 73 6f | 75 72 63 65 20 28 61 20 |ode reso|urce (a |
|000006e0| 22 4d 45 58 22 20 6f 72 | 20 22 4d 41 54 4c 41 42 |"MEX" or| "MATLAB|
|000006f0| 22 20 66 69 6c 65 29 2c | 20 74 6f 20 62 65 20 69 |" file),| to be i|
|00000700| 6e 76 6f 6b 65 64 20 62 | 79 0d 74 79 70 69 6e 67 |nvoked b|y.typing|
|00000710| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 6e 61 | the fun|ction na|
|00000720| 6d 65 20 66 72 6f 6d 20 | 77 69 74 68 69 6e 20 4d |me from |within M|
|00000730| 61 74 4c 61 62 2e 20 54 | 68 65 20 73 79 6d 62 6f |atLab. T|he symbo|
|00000740| 6c 20 4d 41 54 4c 41 42 | 2c 20 69 66 20 64 65 66 |l MATLAB|, if def|
|00000750| 69 6e 65 64 2c 0d 65 6e | 61 62 6c 65 73 20 74 68 |ined,.en|ables th|
|00000760| 65 20 63 72 65 61 74 69 | 6f 6e 20 6f 66 20 61 20 |e creati|on of a |
|00000770| 4d 41 54 4c 41 42 20 66 | 69 6c 65 2e 20 57 65 20 |MATLAB f|ile. We |
|00000780| 73 75 67 67 65 73 74 20 | 74 68 61 74 20 69 66 20 |suggest |that if |
|00000790| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 63 72 65 61 |you want| to crea|
|000007a0| 74 65 20 61 0d 4d 41 54 | 4c 41 42 20 66 69 6c 65 |te a.MAT|LAB file|
|000007b0| 2c 20 74 68 65 6e 20 79 | 6f 75 20 73 68 6f 75 6c |, then y|ou shoul|
|000007c0| 64 20 74 79 70 65 20 22 | 23 64 65 66 69 6e 65 20 |d type "|#define |
|000007d0| 4d 41 54 4c 41 42 22 2c | 20 77 69 74 68 6f 75 74 |MATLAB",| without|
|000007e0| 20 74 68 65 20 71 75 6f | 74 65 73 2c 20 69 6e 74 | the quo|tes, int|
|000007f0| 6f 20 74 68 65 0d 50 72 | 65 66 69 78 20 77 69 6e |o the.Pr|efix win|
|00000800| 64 6f 77 20 6f 66 20 79 | 6f 75 72 20 54 48 49 4e |dow of y|our THIN|
|00000810| 4b 20 43 20 70 72 6f 6a | 65 63 74 20 28 74 72 79 |K C proj|ect (try|
|00000820| 20 6d 65 6e 75 20 45 64 | 69 74 3a 4f 70 74 69 6f | menu Ed|it:Optio|
|00000830| 6e 73 3a 50 72 65 66 69 | 78 29 2e 20 54 68 69 73 |ns:Prefi|x). This|
|00000840| 20 77 69 6c 6c 0d 68 61 | 76 65 20 74 68 65 20 73 | will.ha|ve the s|
|00000850| 61 6d 65 20 65 66 66 65 | 63 74 20 61 73 20 74 79 |ame effe|ct as ty|
|00000860| 70 69 6e 67 20 69 74 20 | 61 74 20 74 68 65 20 74 |ping it |at the t|
|00000870| 6f 70 20 6f 66 20 65 76 | 65 72 79 20 43 20 66 69 |op of ev|ery C fi|
|00000880| 6c 65 20 69 6e 20 79 6f | 75 72 20 70 72 6f 6a 65 |le in yo|ur proje|
|00000890| 63 74 2c 0d 62 75 74 20 | 77 69 74 68 6f 75 74 20 |ct,.but |without |
|000008a0| 6d 6f 64 69 66 79 69 6e | 67 20 74 68 65 20 73 6f |modifyin|g the so|
|000008b0| 75 72 63 65 20 66 69 6c | 65 73 2e 20 64 68 62 20 |urce fil|es. dhb |
|000008c0| 26 20 64 67 70 2e 0d 2a | 2f 0d 23 69 6e 63 6c 75 |& dgp..*|/.#inclu|
|000008d0| 64 65 20 3c 73 74 64 69 | 6f 2e 68 3e 09 09 2f 2f |de <stdi|o.h>..//|
|000008e0| 20 72 65 71 75 69 72 65 | 64 0d 23 69 6e 63 6c 75 | require|d.#inclu|
|000008f0| 64 65 20 3c 73 74 64 6c | 69 62 2e 68 3e 0d 2f 2f |de <stdl|ib.h>.//|
|00000900| 20 54 68 69 73 20 69 6e | 63 6c 75 64 65 73 20 74 | This in|cludes t|
|00000910| 68 65 20 4d 41 54 4c 41 | 42 20 68 65 61 64 65 72 |he MATLA|B header|
|00000920| 20 69 66 20 61 70 70 72 | 6f 70 72 69 61 74 65 2e | if appr|opriate.|
|00000930| 20 20 4f 74 68 65 72 77 | 69 73 65 20 69 74 0d 2f | Otherw|ise it./|
|00000940| 2f 20 64 65 66 69 6e 65 | 73 20 73 6f 6d 65 20 64 |/ define|s some d|
|00000950| 61 74 61 20 74 79 70 65 | 73 20 74 68 61 74 20 61 |ata type|s that a|
|00000960| 72 65 20 70 72 6f 76 69 | 64 65 64 20 62 79 20 74 |re provi|ded by t|
|00000970| 68 65 20 4d 41 54 4c 41 | 42 20 68 65 61 64 65 72 |he MATLA|B header|
|00000980| 0d 2f 2f 20 73 6f 20 74 | 68 61 74 20 63 6f 64 65 |.// so t|hat code|
|00000990| 20 74 68 61 74 20 75 73 | 65 73 20 74 68 65 73 65 | that us|es these|
|000009a0| 20 74 79 70 65 73 20 6d | 61 79 20 62 65 20 63 6f | types m|ay be co|
|000009b0| 6d 70 69 6c 65 64 20 66 | 6f 72 20 75 73 65 20 69 |mpiled f|or use i|
|000009c0| 6e 0d 2f 2f 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |n.// app|lication|
|000009d0| 73 2e 0d 23 69 66 64 65 | 66 20 4d 41 54 4c 41 42 |s..#ifde|f MATLAB|
|000009e0| 0d 09 2f 2f 20 4d 75 73 | 74 20 63 6f 6d 65 20 61 |..// Mus|t come a|
|000009f0| 66 74 65 72 20 73 74 64 | 6c 69 62 2e 68 20 61 6e |fter std|lib.h an|
|00000a00| 64 20 73 74 64 69 6f 2e | 68 2c 20 61 6e 64 20 62 |d stdio.|h, and b|
|00000a10| 65 66 6f 72 65 20 65 76 | 65 72 79 74 68 69 6e 67 |efore ev|erything|
|00000a20| 20 65 6c 73 65 2e 0d 09 | 23 69 6e 63 6c 75 64 65 | else...|#include|
|00000a30| 20 3c 63 6d 65 78 2e 68 | 3e 0d 23 65 6c 73 65 0d | <cmex.h|>.#else.|
|00000a40| 09 74 79 70 65 64 65 66 | 20 6c 6f 6e 67 20 69 6e |.typedef| long in|
|00000a50| 74 20 49 4e 54 3b 0d 09 | 74 79 70 65 64 65 66 20 |t INT;..|typedef |
|00000a60| 73 68 6f 72 74 20 64 6f | 75 62 6c 65 20 44 4f 55 |short do|uble DOU|
|00000a70| 42 4c 45 3b 0d 09 74 79 | 70 65 64 65 66 20 73 74 |BLE;..ty|pedef st|
|00000a80| 72 75 63 74 20 7b 0d 09 | 09 63 68 61 72 20 2a 6e |ruct {..|.char *n|
|00000a90| 61 6d 65 3b 0d 09 09 49 | 4e 54 20 74 79 70 65 3b |ame;...I|NT type;|
|00000aa0| 0d 09 09 49 4e 54 20 6d | 3b 0d 09 09 49 4e 54 20 |...INT m|;...INT |
|00000ab0| 6e 3b 0d 09 09 44 4f 55 | 42 4c 45 20 2a 70 72 3b |n;...DOU|BLE *pr;|
|00000ac0| 0d 09 09 44 4f 55 42 4c | 45 20 2a 70 69 3b 0d 09 |...DOUBL|E *pi;..|
|00000ad0| 7d 20 4d 61 74 72 69 78 | 3b 0d 23 65 6e 64 69 66 |} Matrix|;.#endif|
|00000ae0| 0d 2f 2f 20 41 4e 53 49 | 20 68 65 61 64 65 72 73 |.// ANSI| headers|
|00000af0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 63 74 79 70 65 |.#includ|e <ctype|
|00000b00| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 66 6c |.h>.#inc|lude <fl|
|00000b10| 6f 61 74 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |oat.h>.#|include |
|00000b20| 3c 6c 69 6d 69 74 73 2e | 68 3e 0d 23 69 6e 63 6c |<limits.|h>.#incl|
|00000b30| 75 64 65 20 3c 73 74 72 | 69 6e 67 2e 68 3e 0d 23 |ude <str|ing.h>.#|
|00000b40| 69 6e 63 6c 75 64 65 20 | 3c 74 69 6d 65 2e 68 3e |include |<time.h>|
|00000b50| 0d 2f 2f 20 4d 61 63 69 | 6e 74 6f 73 68 20 68 65 |.// Maci|ntosh he|
|00000b60| 61 64 65 72 73 0d 23 69 | 66 20 54 48 49 4e 4b 5f |aders.#i|f THINK_|
|00000b70| 43 0d 09 23 69 6e 63 6c | 75 64 65 20 3c 63 6f 6e |C..#incl|ude <con|
|00000b80| 73 6f 6c 65 2e 68 3e 0d | 23 65 6e 64 69 66 0d 23 |sole.h>.|#endif.#|
|00000b90| 69 6e 63 6c 75 64 65 20 | 3c 44 65 76 69 63 65 73 |include |<Devices|
|00000ba0| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 45 76 |.h>.#inc|lude <Ev|
|00000bb0| 65 6e 74 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |ents.h>.|#include|
|00000bc0| 20 3c 46 69 78 4d 61 74 | 68 2e 68 3e 09 2f 2f 20 | <FixMat|h.h>.// |
|00000bd0| 4d 75 73 74 20 63 6f 6d | 65 20 62 65 66 6f 72 65 |Must com|e before|
|00000be0| 20 6d 63 36 38 38 38 31 | 2e 68 0d 23 69 6e 63 6c | mc68881|.h.#incl|
|00000bf0| 75 64 65 20 3c 46 6f 6e | 74 73 2e 68 3e 0d 23 69 |ude <Fon|ts.h>.#i|
|00000c00| 6e 63 6c 75 64 65 20 3c | 47 65 73 74 61 6c 74 45 |nclude <|GestaltE|
|00000c10| 71 75 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |qu.h>.#i|nclude <|
|00000c20| 4d 65 6d 6f 72 79 2e 68 | 3e 0d 23 69 6e 63 6c 75 |Memory.h|>.#inclu|
|00000c30| 64 65 20 3c 4f 53 45 76 | 65 6e 74 73 2e 68 3e 0d |de <OSEv|ents.h>.|
|00000c40| 23 69 6e 63 6c 75 64 65 | 20 3c 4f 53 55 74 69 6c |#include| <OSUtil|
|00000c50| 73 2e 68 3e 09 2f 2f 20 | 72 65 71 75 69 72 65 64 |s.h>.// |required|
|00000c60| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 50 61 6c 65 74 |.#includ|e <Palet|
|00000c70| 74 65 73 2e 68 3e 09 2f | 2f 20 66 6f 72 6d 65 72 |tes.h>./|/ former|
|00000c80| 6c 79 20 50 61 6c 65 74 | 74 65 2e 68 0d 23 69 66 |ly Palet|te.h.#if|
|00000c90| 20 54 48 49 4e 4b 5f 43 | 0d 09 23 69 6e 63 6c 75 | THINK_C|..#inclu|
|00000ca0| 64 65 20 3c 70 61 73 63 | 61 6c 2e 68 3e 09 2f 2f |de <pasc|al.h>.//|
|00000cb0| 20 63 32 70 73 74 72 28 | 29 2c 43 74 6f 50 53 74 | c2pstr(|),CtoPSt|
|00000cc0| 72 28 29 0d 23 65 6e 64 | 69 66 0d 23 69 6e 63 6c |r().#end|if.#incl|
|00000cd0| 75 64 65 20 3c 51 44 4f | 66 66 73 63 72 65 65 6e |ude <QDO|ffscreen|
|00000ce0| 2e 68 3e 2f 2f 20 66 6f | 72 6d 65 72 6c 79 20 51 |.h>// fo|rmerly Q|
|00000cf0| 75 69 63 6b 44 72 61 77 | 33 32 42 69 74 2e 68 0d |uickDraw|32Bit.h.|
|00000d00| 23 69 6e 63 6c 75 64 65 | 20 3c 51 75 69 63 6b 44 |#include| <QuickD|
|00000d10| 72 61 77 2e 68 3e 09 2f | 2f 20 72 65 71 75 69 72 |raw.h>./|/ requir|
|00000d20| 65 64 0d 23 69 6e 63 6c | 75 64 65 20 3c 52 65 73 |ed.#incl|ude <Res|
|00000d30| 6f 75 72 63 65 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |ources.h|>.#inclu|
|00000d40| 64 65 20 3c 52 65 74 72 | 61 63 65 2e 68 3e 09 2f |de <Retr|ace.h>./|
|00000d50| 2f 20 72 65 71 75 69 72 | 65 64 0d 23 69 6e 63 6c |/ requir|ed.#incl|
|00000d60| 75 64 65 20 3c 53 6c 6f | 74 73 2e 68 3e 0d 23 69 |ude <Slo|ts.h>.#i|
|00000d70| 6e 63 6c 75 64 65 20 3c | 53 6f 75 6e 64 2e 68 3e |nclude <|Sound.h>|
|00000d80| 0d 23 69 66 6e 64 65 66 | 20 54 48 49 4e 4b 5f 43 |.#ifndef| THINK_C|
|00000d90| 09 09 09 2f 2f 20 65 2e | 67 2e 20 4d 50 57 20 43 |...// e.|g. MPW C|
|00000da0| 0d 09 23 69 6e 63 6c 75 | 64 65 20 3c 53 74 72 69 |..#inclu|de <Stri|
|00000db0| 6e 67 73 2e 68 3e 2f 2f | 20 63 32 70 73 74 72 28 |ngs.h>//| c2pstr(|
|00000dc0| 29 2c 43 74 6f 50 53 74 | 72 28 29 0d 23 65 6e 64 |),CtoPSt|r().#end|
|00000dd0| 69 66 0d 23 69 6e 63 6c | 75 64 65 20 3c 54 69 6d |if.#incl|ude <Tim|
|00000de0| 65 72 2e 68 3e 09 09 2f | 2f 20 72 65 71 75 69 72 |er.h>../|/ requir|
|00000df0| 65 64 0d 23 69 6e 63 6c | 75 64 65 20 3c 54 6f 6f |ed.#incl|ude <Too|
|00000e00| 6c 55 74 69 6c 73 2e 68 | 3e 0d 23 69 6e 63 6c 75 |lUtils.h|>.#inclu|
|00000e10| 64 65 20 3c 56 69 64 65 | 6f 2e 68 3e 0d 23 69 6e |de <Vide|o.h>.#in|
|00000e20| 63 6c 75 64 65 20 3c 57 | 69 6e 64 6f 77 73 2e 68 |clude <W|indows.h|
|00000e30| 3e 09 2f 2f 20 72 65 71 | 75 69 72 65 64 0d 0d 2f |>.// req|uired../|
|00000e40| 2a 0d 54 68 69 73 20 6e | 65 78 74 20 62 69 74 20 |*.This n|ext bit |
|00000e50| 69 73 20 6f 6e 6c 79 20 | 66 6f 72 20 4d 41 54 4c |is only |for MATL|
|00000e60| 41 42 20 66 69 6c 65 73 | 2c 20 74 6f 20 64 65 61 |AB files|, to dea|
|00000e70| 6c 20 77 69 74 68 20 51 | 75 69 63 6b 44 72 61 77 |l with Q|uickDraw|
|00000e80| 20 67 6c 6f 62 61 6c 73 | 2e 20 49 6e 20 54 48 49 | globals|. In THI|
|00000e90| 4e 4b 0d 43 20 77 65 20 | 68 61 76 65 20 74 6f 20 |NK.C we |have to |
|00000ea0| 65 78 70 6c 69 63 69 74 | 6c 79 20 61 6c 6c 6f 63 |explicit|ly alloc|
|00000eb0| 61 74 65 20 73 70 61 63 | 65 20 66 6f 72 20 51 75 |ate spac|e for Qu|
|00000ec0| 69 63 6b 44 72 61 77 20 | 67 6c 6f 62 61 6c 73 20 |ickDraw |globals |
|00000ed0| 61 6e 64 20 49 6e 69 74 | 47 72 61 66 20 74 68 65 |and Init|Graf the|
|00000ee0| 6d 0d 77 68 65 6e 20 6f | 75 72 20 63 6f 64 65 20 |m.when o|ur code |
|00000ef0| 72 65 73 6f 75 72 63 65 | 20 69 73 20 66 69 72 73 |resource| is firs|
|00000f00| 74 20 69 6e 76 6f 6b 65 | 64 2e 20 56 69 64 65 6f |t invoke|d. Video|
|00000f10| 54 6f 6f 6c 62 6f 78 2e | 68 20 77 69 6c 6c 20 62 |Toolbox.|h will b|
|00000f20| 65 20 69 6e 63 6c 75 64 | 65 64 20 69 6e 20 61 6c |e includ|ed in al|
|00000f30| 6c 0d 74 68 65 20 43 20 | 66 69 6c 65 73 20 74 68 |l.the C |files th|
|00000f40| 61 74 20 6d 61 6b 65 20 | 75 70 20 79 6f 75 72 20 |at make |up your |
|00000f50| 4d 41 54 4c 41 42 20 70 | 72 6f 6a 65 63 74 2e 20 |MATLAB p|roject. |
|00000f60| 54 68 65 20 73 79 6d 62 | 6f 6c 20 22 4d 41 49 4e |The symb|ol "MAIN|
|00000f70| 22 20 64 65 74 65 72 6d | 69 6e 65 73 0d 77 68 65 |" determ|ines.whe|
|00000f80| 74 68 65 72 20 74 68 65 | 20 67 6c 6f 62 61 6c 20 |ther the| global |
|00000f90| 73 74 72 75 63 74 75 72 | 65 20 6d 65 78 5f 71 64 |structur|e mex_qd|
|00000fa0| 20 69 73 20 61 6c 6c 6f | 63 61 74 65 64 20 6f 72 | is allo|cated or|
|00000fb0| 20 6a 75 73 74 20 64 65 | 63 6c 61 72 65 64 20 61 | just de|clared a|
|00000fc0| 73 20 65 78 74 65 72 6e | 2e 0d 54 48 49 4e 4b 20 |s extern|..THINK |
|00000fd0| 43 20 63 6f 6d 70 6c 61 | 69 6e 73 20 69 66 20 73 |C compla|ins if s|
|00000fe0| 70 61 63 65 20 69 73 20 | 61 6c 6c 6f 63 61 74 65 |pace is |allocate|
|00000ff0| 64 20 6d 6f 72 65 20 74 | 68 61 6e 20 6f 6e 63 65 |d more t|han once|
|00001000| 20 6f 72 20 6e 65 76 65 | 72 20 61 6c 6c 6f 63 61 | or neve|r alloca|
|00001010| 74 65 64 2e 20 20 53 6f | 0d 79 6f 75 20 6e 65 65 |ted. So|.you nee|
|00001020| 64 20 74 6f 20 22 23 64 | 65 66 69 6e 65 20 4d 41 |d to "#d|efine MA|
|00001030| 49 4e 20 31 22 20 61 74 | 20 74 68 65 20 73 74 61 |IN 1" at| the sta|
|00001040| 72 74 20 6f 66 20 6f 6e | 65 20 66 69 6c 65 20 69 |rt of on|e file i|
|00001050| 6e 20 65 76 65 72 79 20 | 4d 41 54 4c 41 42 20 70 |n every |MATLAB p|
|00001060| 72 6f 6a 65 63 74 2e 20 | 49 0d 61 6c 77 61 79 73 |roject. |I.always|
|00001070| 20 64 6f 20 69 74 20 69 | 6e 20 74 68 65 20 66 69 | do it i|n the fi|
|00001080| 6c 65 20 74 68 61 74 20 | 63 6f 6e 74 61 69 6e 73 |le that |contains|
|00001090| 20 74 68 65 20 65 6e 74 | 72 79 20 70 6f 69 6e 74 | the ent|ry point|
|000010a0| 20 28 65 2e 67 2e 20 6d | 61 69 6e 20 6f 72 0d 75 | (e.g. m|ain or.u|
|000010b0| 73 65 72 5f 66 63 6e 29 | 2e 2d 2d 20 64 68 62 2e |ser_fcn)|.-- dhb.|
|000010c0| 0d 2a 2f 0d 23 69 66 64 | 65 66 20 4d 41 54 4c 41 |.*/.#ifd|ef MATLA|
|000010d0| 42 0d 09 23 69 66 64 65 | 66 20 54 48 49 4e 4b 5f |B..#ifde|f THINK_|
|000010e0| 43 0d 09 09 23 69 66 64 | 65 66 20 4d 41 49 4e 0d |C...#ifd|ef MAIN.|
|000010f0| 09 09 09 54 48 49 4e 4b | 5f 43 5f 51 44 20 6d 65 |...THINK|_C_QD me|
|00001100| 78 5f 71 64 3b 09 2f 2f | 20 41 6c 6c 6f 63 61 74 |x_qd;.//| Allocat|
|00001110| 65 20 73 74 6f 72 61 67 | 65 20 66 6f 72 20 51 44 |e storag|e for QD|
|00001120| 20 67 6c 6f 62 61 6c 73 | 2e 0d 09 09 23 65 6c 73 | globals|....#els|
|00001130| 65 0d 09 09 09 65 78 74 | 65 72 6e 20 54 48 49 4e |e....ext|ern THIN|
|00001140| 4b 5f 43 5f 51 44 20 6d | 65 78 5f 71 64 3b 0d 09 |K_C_QD m|ex_qd;..|
|00001150| 09 23 65 6e 64 69 66 0d | 09 09 23 64 65 66 69 6e |.#endif.|..#defin|
|00001160| 65 20 71 64 20 6d 65 78 | 5f 71 64 0d 09 23 65 6c |e qd mex|_qd..#el|
|00001170| 73 65 0d 09 09 23 64 65 | 66 69 6e 65 20 6d 65 78 |se...#de|fine mex|
|00001180| 5f 71 64 20 71 64 0d 09 | 23 65 6e 64 69 66 0d 23 |_qd qd..|#endif.#|
|00001190| 65 6e 64 69 66 0d 0d 2f | 2a 0d 54 52 55 45 20 61 |endif../|*.TRUE a|
|000011a0| 6e 64 20 46 41 4c 53 45 | 0d 2a 2f 0d 23 69 66 6e |nd FALSE|.*/.#ifn|
|000011b0| 64 65 66 20 54 52 55 45 | 0d 09 23 64 65 66 69 6e |def TRUE|..#defin|
|000011c0| 65 20 46 41 4c 53 45 09 | 30 0d 09 23 64 65 66 69 |e FALSE.|0..#defi|
|000011d0| 6e 65 20 54 52 55 45 09 | 31 0d 23 65 6e 64 69 66 |ne TRUE.|1.#endif|
|000011e0| 0d 0d 2f 2a 0d 4e 41 4e | 20 26 20 49 4e 46 0d 49 |../*.NAN| & INF.I|
|000011f0| 66 20 79 6f 75 27 72 65 | 20 75 73 69 6e 67 20 4e |f you're| using N|
|00001200| 41 4e 20 61 6e 64 20 49 | 4e 46 20 79 6f 75 27 6c |AN and I|NF you'l|
|00001210| 6c 20 62 65 20 69 6e 74 | 65 72 65 73 74 65 64 20 |l be int|erested |
|00001220| 69 6e 20 74 68 65 20 49 | 73 4e 61 6e 28 29 2c 20 |in the I|sNan(), |
|00001230| 49 73 49 6e 66 28 29 2c | 20 61 6e 64 0d 49 73 46 |IsInf(),| and.IsF|
|00001240| 69 6e 69 74 65 28 29 20 | 64 65 66 69 6e 69 74 69 |inite() |definiti|
|00001250| 6f 6e 73 20 26 20 70 72 | 6f 74 6f 74 79 70 65 73 |ons & pr|ototypes|
|00001260| 20 62 65 6c 6f 77 2e 20 | 4e 6f 74 65 20 74 68 61 | below. |Note tha|
|00001270| 74 20 74 68 65 20 54 48 | 49 4e 4b 20 43 20 63 6f |t the TH|INK C co|
|00001280| 6d 70 69 6c 65 72 20 69 | 73 0d 74 69 6d 69 64 2c |mpiler i|s.timid,|
|00001290| 20 77 6f 72 72 69 65 64 | 20 61 62 6f 75 74 20 70 | worried| about p|
|000012a0| 6f 73 73 69 62 6c 65 20 | 65 78 63 65 70 74 69 6f |ossible |exceptio|
|000012b0| 6e 20 65 76 65 6e 74 73 | 2c 20 73 6f 20 74 68 65 |n events|, so the|
|000012c0| 20 49 4e 46 20 61 6e 64 | 20 4e 41 4e 20 65 78 70 | INF and| NAN exp|
|000012d0| 72 65 73 73 69 6f 6e 73 | 0d 62 65 6c 6f 77 20 61 |ressions|.below a|
|000012e0| 72 65 20 65 76 61 6c 75 | 61 74 65 64 20 61 74 20 |re evalu|ated at |
|000012f0| 72 75 6e 74 69 6d 65 2e | 20 28 44 72 61 74 21 29 |runtime.| (Drat!)|
|00001300| 20 49 66 20 79 6f 75 20 | 75 73 65 20 74 68 65 73 | If you |use thes|
|00001310| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 73 20 69 6e |e expres|sions in|
|00001320| 20 61 20 74 69 67 68 74 | 0d 6c 6f 6f 70 2c 20 79 | a tight|.loop, y|
|00001330| 6f 75 27 64 20 62 65 20 | 62 65 74 74 65 72 20 6f |ou'd be |better o|
|00001340| 66 66 20 70 75 74 74 69 | 6e 67 20 74 68 65 20 76 |ff putti|ng the v|
|00001350| 61 6c 75 65 20 69 6e 20 | 61 20 76 61 72 69 61 62 |alue in |a variab|
|00001360| 6c 65 20 28 70 72 65 66 | 65 72 61 62 6c 79 20 61 |le (pref|erably a|
|00001370| 0d 72 65 67 69 73 74 65 | 72 29 20 61 6e 64 20 75 |.registe|r) and u|
|00001380| 73 69 6e 67 20 74 68 61 | 74 20 69 6e 73 74 65 61 |sing tha|t instea|
|00001390| 64 2e 0d 2a 2f 0d 23 69 | 66 20 21 64 65 66 69 6e |d..*/.#i|f !defin|
|000013a0| 65 64 28 49 4e 46 29 0d | 09 23 64 65 66 69 6e 65 |ed(INF).|.#define|
|000013b0| 20 49 4e 46 09 28 31 2e | 30 2f 30 2e 30 29 09 09 | INF.(1.|0/0.0)..|
|000013c0| 2f 2a 20 49 6e 66 69 6e | 69 74 79 20 2a 2f 0d 23 |/* Infin|ity */.#|
|000013d0| 65 6e 64 69 66 0d 23 69 | 66 20 21 64 65 66 69 6e |endif.#i|f !defin|
|000013e0| 65 64 28 4e 41 4e 29 0d | 09 23 64 65 66 69 6e 65 |ed(NAN).|.#define|
|000013f0| 20 4e 41 4e 09 28 30 2e | 30 2f 30 2e 30 29 09 09 | NAN.(0.|0/0.0)..|
|00001400| 2f 2a 20 4e 6f 74 20 61 | 20 4e 75 6d 62 65 72 20 |/* Not a| Number |
|00001410| 2a 2f 0d 23 65 6e 64 69 | 66 0d 2f 2a 0d 4e 55 4d |*/.#endi|f./*.NUM|
|00001420| 45 52 49 43 41 4c 20 43 | 4f 4e 53 54 41 4e 54 53 |ERICAL C|ONSTANTS|
|00001430| 0d 49 74 27 73 20 73 61 | 64 20 74 6f 20 73 61 79 |.It's sa|d to say|
|00001440| 2c 20 62 75 74 20 54 48 | 49 4e 4b 20 43 20 35 2e |, but TH|INK C 5.|
|00001450| 30 32 20 6c 6f 73 65 73 | 20 74 77 6f 20 62 69 74 |02 loses| two bit|
|00001460| 73 20 6f 66 20 70 72 65 | 63 69 73 69 6f 6e 20 63 |s of pre|cision c|
|00001470| 6f 6e 76 65 72 74 69 6e | 67 20 62 65 74 77 65 65 |onvertin|g betwee|
|00001480| 6e 0d 64 6f 75 62 6c 65 | 73 20 61 6e 64 20 61 73 |n.double|s and as|
|00001490| 63 69 69 20 74 65 78 74 | 2c 20 69 6e 20 65 69 74 |cii text|, in eit|
|000014a0| 68 65 72 20 64 69 72 65 | 63 74 69 6f 6e 2e 20 54 |her dire|ction. T|
|000014b0| 68 75 73 20 79 6f 75 20 | 77 69 6c 6c 20 6f 62 74 |hus you |will obt|
|000014c0| 61 69 6e 20 6d 6f 72 65 | 20 61 63 63 75 72 61 74 |ain more| accurat|
|000014d0| 65 0d 72 65 73 75 6c 74 | 73 20 62 79 20 63 6f 6d |e.result|s by com|
|000014e0| 70 75 74 69 6e 67 20 74 | 68 65 20 6e 75 6d 65 72 |puting t|he numer|
|000014f0| 69 63 61 6c 20 63 6f 6e | 73 74 61 6e 74 73 20 62 |ical con|stants b|
|00001500| 65 6c 6f 77 20 61 74 20 | 72 75 6e 74 69 6d 65 20 |elow at |runtime |
|00001510| 72 61 74 68 65 72 20 74 | 68 61 6e 20 75 73 69 6e |rather t|han usin|
|00001520| 67 0d 74 68 65 73 65 20 | 70 72 65 64 65 66 69 6e |g.these |predefin|
|00001530| 65 64 20 63 6f 6e 73 74 | 61 6e 74 73 2e 20 54 68 |ed const|ants. Th|
|00001540| 65 20 41 4e 53 49 20 4e | 75 6d 65 72 69 63 61 6c |e ANSI N|umerical|
|00001550| 20 43 20 45 78 74 65 6e | 73 69 6f 6e 73 20 67 72 | C Exten|sions gr|
|00001560| 6f 75 70 20 69 73 20 6d | 6f 76 69 6e 67 20 74 6f |oup is m|oving to|
|00001570| 0d 72 65 71 75 69 72 65 | 20 43 20 63 6f 6d 70 69 |.require| C compi|
|00001580| 6c 65 72 73 20 74 6f 20 | 70 72 65 73 65 72 76 65 |lers to |preserve|
|00001590| 20 70 72 65 63 69 73 69 | 6f 6e 2c 20 73 6f 20 74 | precisi|on, so t|
|000015a0| 68 65 72 65 20 69 73 20 | 68 6f 70 65 20 66 6f 72 |here is |hope for|
|000015b0| 20 74 68 65 20 66 75 74 | 75 72 65 2e 20 4f 66 0d | the fut|ure. Of.|
|000015c0| 63 6f 75 72 73 65 20 6d | 6f 73 74 20 61 70 70 6c |course m|ost appl|
|000015d0| 69 63 61 74 69 6f 6e 73 | 20 77 6f 75 6c 64 20 6e |ications| would n|
|000015e0| 65 76 65 72 20 6e 6f 74 | 69 63 65 20 61 20 6c 6f |ever not|ice a lo|
|000015f0| 73 73 20 6f 66 20 74 77 | 6f 20 62 69 74 73 20 70 |ss of tw|o bits p|
|00001600| 72 65 63 69 73 69 6f 6e | 20 6f 75 74 20 6f 66 0d |recision| out of.|
|00001610| 74 68 65 20 74 6f 74 61 | 6c 20 64 6f 75 62 6c 65 |the tota|l double|
|00001620| 20 70 72 65 63 69 73 69 | 6f 6e 20 67 69 76 65 6e | precisi|on given|
|00001630| 20 62 79 20 74 68 65 20 | 36 34 20 62 69 74 73 20 | by the |64 bits |
|00001640| 69 6e 20 74 68 65 20 6d | 61 6e 74 69 73 73 61 2e |in the m|antissa.|
|00001650| 0d 2a 2f 0d 23 69 66 20 | 21 64 65 66 69 6e 65 64 |.*/.#if |!defined|
|00001660| 28 50 49 29 0d 09 23 64 | 65 66 69 6e 65 20 50 49 |(PI)..#d|efine PI|
|00001670| 09 09 33 2e 31 34 31 35 | 39 32 36 35 33 35 38 39 |..3.1415|92653589|
|00001680| 37 39 33 32 33 38 35 09 | 2f 2a 20 63 6f 6d 70 75 |7932385.|/* compu|
|00001690| 74 65 64 20 69 6e 20 4d | 61 74 68 65 6d 61 74 69 |ted in M|athemati|
|000016a0| 63 61 20 2a 2f 0d 23 65 | 6e 64 69 66 0d 23 69 66 |ca */.#e|ndif.#if|
|000016b0| 20 21 64 65 66 69 6e 65 | 64 28 4c 4f 47 50 49 29 | !define|d(LOGPI)|
|000016c0| 0d 09 23 64 65 66 69 6e | 65 20 4c 4f 47 50 49 09 |..#defin|e LOGPI.|
|000016d0| 31 2e 31 34 34 37 32 39 | 38 38 35 38 34 39 34 30 |1.144729|88584940|
|000016e0| 30 31 37 34 31 34 09 2f | 2a 20 63 6f 6d 70 75 74 |017414./|* comput|
|000016f0| 65 64 20 69 6e 20 4d 61 | 74 68 65 6d 61 74 69 63 |ed in Ma|thematic|
|00001700| 61 20 2a 2f 0d 23 65 6e | 64 69 66 0d 23 69 66 20 |a */.#en|dif.#if |
|00001710| 21 64 65 66 69 6e 65 64 | 28 4c 4f 47 32 29 0d 09 |!defined|(LOG2)..|
|00001720| 23 64 65 66 69 6e 65 20 | 4c 4f 47 32 09 30 2e 36 |#define |LOG2.0.6|
|00001730| 39 33 31 34 37 31 38 30 | 35 35 39 39 34 35 33 30 |93147180|55994530|
|00001740| 39 34 32 09 2f 2a 20 63 | 6f 6d 70 75 74 65 64 20 |942./* c|omputed |
|00001750| 69 6e 20 4d 61 74 68 65 | 6d 61 74 69 63 61 20 2a |in Mathe|matica *|
|00001760| 2f 0d 23 65 6e 64 69 66 | 0d 23 69 66 20 21 64 65 |/.#endif|.#if !de|
|00001770| 66 69 6e 65 64 28 4c 4f | 47 31 30 29 0d 09 23 64 |fined(LO|G10)..#d|
|00001780| 65 66 69 6e 65 20 4c 4f | 47 31 30 09 32 2e 33 30 |efine LO|G10.2.30|
|00001790| 32 35 38 35 30 39 32 39 | 39 34 30 34 35 36 38 34 |25850929|94045684|
|000017a0| 30 32 09 2f 2a 20 63 6f | 6d 70 75 74 65 64 20 69 |02./* co|mputed i|
|000017b0| 6e 20 4d 61 74 68 65 6d | 61 74 69 63 61 20 2a 2f |n Mathem|atica */|
|000017c0| 0d 23 65 6e 64 69 66 0d | 0d 2f 2a 0d 43 4f 4c 4f |.#endif.|./*.COLO|
|000017d0| 52 53 0d 54 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |RS.The n|umber of|
|000017e0| 20 63 6f 6c 6f 72 73 20 | 74 68 61 74 20 61 20 76 | colors |that a v|
|000017f0| 69 64 65 6f 20 64 65 76 | 69 63 65 20 63 61 6e 20 |ideo dev|ice can |
|00001800| 64 69 73 70 6c 61 79 2c | 20 69 6e 20 69 74 73 20 |display,| in its |
|00001810| 63 75 72 72 65 6e 74 20 | 6d 6f 64 65 2e 0d 2a 2f |current |mode..*/|
|00001820| 0d 23 64 65 66 69 6e 65 | 20 47 44 43 4f 4c 4f 52 |.#define| GDCOLOR|
|00001830| 53 28 64 65 76 69 63 65 | 29 20 28 28 2a 2a 28 2a |S(device|) ((**(*|
|00001840| 2a 28 2a 2a 64 65 76 69 | 63 65 29 2e 67 64 50 4d |*(**devi|ce).gdPM|
|00001850| 61 70 29 2e 70 6d 54 61 | 62 6c 65 29 2e 63 74 53 |ap).pmTa|ble).ctS|
|00001860| 69 7a 65 2b 31 29 0d 0d | 2f 2a 0d 46 49 58 45 44 |ize+1)..|/*.FIXED|
|00001870| 20 50 4f 49 4e 54 20 41 | 52 49 54 48 4d 45 54 49 | POINT A|RITHMETI|
|00001880| 43 0d 41 70 70 6c 65 20 | 64 65 66 69 6e 65 73 20 |C.Apple |defines |
|00001890| 61 20 68 61 6e 64 79 20 | 64 61 74 61 20 74 79 70 |a handy |data typ|
|000018a0| 65 20 63 61 6c 6c 65 64 | 20 46 69 78 65 64 20 74 |e called| Fixed t|
|000018b0| 68 61 74 20 69 73 20 73 | 74 6f 72 65 64 20 69 6e |hat is s|tored in|
|000018c0| 20 61 20 6c 6f 6e 67 2c | 20 62 75 74 20 69 73 0d | a long,| but is.|
|000018d0| 61 73 73 75 6d 65 64 20 | 74 6f 20 68 61 76 65 20 |assumed |to have |
|000018e0| 61 20 64 65 63 69 6d 61 | 6c 20 70 6f 69 6e 74 20 |a decima|l point |
|000018f0| 69 6e 20 74 68 65 20 6d | 69 64 64 6c 65 2e 20 4d |in the m|iddle. M|
|00001900| 61 6e 79 20 6f 70 65 72 | 61 74 69 6f 6e 73 2c 20 |any oper|ations, |
|00001910| 65 2e 67 2e 20 61 64 64 | 69 6e 67 20 74 77 6f 0d |e.g. add|ing two.|
|00001920| 46 69 78 65 64 20 6e 75 | 6d 62 65 72 73 20 6f 72 |Fixed nu|mbers or|
|00001930| 20 6d 75 6c 74 69 70 6c | 79 69 6e 67 20 6f 72 20 | multipl|ying or |
|00001940| 64 69 76 69 64 69 6e 67 | 20 61 20 46 69 78 65 64 |dividing| a Fixed|
|00001950| 20 62 79 20 61 6e 20 69 | 6e 74 65 67 65 72 2c 20 | by an i|nteger, |
|00001960| 63 61 6e 20 62 65 20 70 | 65 72 66 6f 72 6d 65 64 |can be p|erformed|
|00001970| 0d 64 69 72 65 63 74 6c | 79 2e 20 54 6f 20 6d 75 |.directl|y. To mu|
|00001980| 6c 74 69 70 6c 79 20 6f | 72 20 64 69 76 69 64 65 |ltiply o|r divide|
|00001990| 20 74 77 6f 20 46 69 78 | 65 64 20 6e 75 6d 62 65 | two Fix|ed numbe|
|000019a0| 72 73 20 75 73 65 20 41 | 70 70 6c 65 27 73 20 46 |rs use A|pple's F|
|000019b0| 69 78 4d 75 6c 28 29 20 | 61 6e 64 0d 46 69 78 44 |ixMul() |and.FixD|
|000019c0| 69 76 28 29 2e 20 46 69 | 78 52 61 74 69 6f 28 6e |iv(). Fi|xRatio(n|
|000019d0| 2c 6d 29 20 72 65 74 75 | 72 6e 73 20 74 68 65 20 |,m) retu|rns the |
|000019e0| 46 69 78 65 64 20 72 61 | 74 69 6f 20 6f 66 20 74 |Fixed ra|tio of t|
|000019f0| 77 6f 20 69 6e 74 65 67 | 65 72 73 2e 20 4d 61 63 |wo integ|ers. Mac|
|00001a00| 69 6e 74 6f 73 68 20 43 | 0d 63 6f 6d 70 69 6c 65 |intosh C|.compile|
|00001a10| 72 73 20 64 65 66 69 6e | 65 20 64 6f 75 62 6c 65 |rs defin|e double|
|00001a20| 20 69 6e 20 76 61 72 69 | 6f 75 73 20 77 61 79 73 | in vari|ous ways|
|00001a30| 2c 20 64 65 70 65 6e 64 | 69 6e 67 20 6f 6e 20 77 |, depend|ing on w|
|00001a40| 68 65 74 68 65 72 20 61 | 20 66 6c 6f 61 74 69 6e |hether a| floatin|
|00001a50| 67 20 70 6f 69 6e 74 0d | 75 6e 69 74 20 69 73 20 |g point.|unit is |
|00001a60| 74 6f 20 62 65 20 75 73 | 65 64 2e 20 54 68 65 20 |to be us|ed. The |
|00001a70| 41 70 70 6c 65 2d 70 72 | 6f 76 69 64 65 64 20 72 |Apple-pr|ovided r|
|00001a80| 6f 75 74 69 6e 65 73 20 | 66 6f 72 20 64 6f 69 6e |outines |for doin|
|00001a90| 67 20 74 79 70 65 20 63 | 6f 6e 76 65 72 73 69 6f |g type c|onversio|
|00001aa0| 6e 20 74 6f 20 61 6e 64 | 0d 66 72 6f 6d 20 46 69 |n to and|.from Fi|
|00001ab0| 78 65 64 20 61 72 65 20 | 6f 6e 6c 79 20 61 70 70 |xed are |only app|
|00001ac0| 72 6f 70 72 69 61 74 65 | 20 69 66 20 79 6f 75 20 |ropriate| if you |
|00001ad0| 61 72 65 20 4e 4f 54 20 | 75 73 69 6e 67 20 74 68 |are NOT |using th|
|00001ae0| 65 20 66 6c 6f 61 74 69 | 6e 67 20 70 6f 69 6e 74 |e floati|ng point|
|00001af0| 20 75 6e 69 74 2e 0d 54 | 68 65 20 6f 6e 65 73 20 | unit..T|he ones |
|00001b00| 64 65 66 69 6e 65 64 20 | 62 65 6c 6f 77 20 61 72 |defined |below ar|
|00001b10| 65 20 66 61 73 74 65 72 | 20 61 6e 64 20 77 6f 72 |e faster| and wor|
|00001b20| 6b 20 77 69 74 68 20 6f | 72 20 77 69 74 68 6f 75 |k with o|r withou|
|00001b30| 74 20 74 68 65 20 46 50 | 55 2e 0d 2a 2f 0d 23 64 |t the FP|U..*/.#d|
|00001b40| 65 66 69 6e 65 20 4c 6f | 6e 67 54 6f 46 69 78 28 |efine Lo|ngToFix(|
|00001b50| 78 29 20 28 28 6c 6f 6e | 67 29 28 78 29 3c 3c 31 |x) ((lon|g)(x)<<1|
|00001b60| 36 29 0d 23 64 65 66 69 | 6e 65 20 46 69 78 54 6f |6).#defi|ne FixTo|
|00001b70| 4c 6f 6e 67 28 78 29 20 | 28 28 78 29 3e 3e 31 36 |Long(x) |((x)>>16|
|00001b80| 29 0d 23 64 65 66 69 6e | 65 20 44 6f 75 62 6c 65 |).#defin|e Double|
|00001b90| 54 6f 46 69 78 28 78 29 | 20 28 28 46 69 78 65 64 |ToFix(x)| ((Fixed|
|00001ba0| 29 28 28 78 29 2a 36 35 | 35 33 36 2e 2b 30 2e 35 |)((x)*65|536.+0.5|
|00001bb0| 29 29 0d 23 64 65 66 69 | 6e 65 20 46 69 78 54 6f |)).#defi|ne FixTo|
|00001bc0| 44 6f 75 62 6c 65 28 78 | 29 20 28 28 64 6f 75 62 |Double(x|) ((doub|
|00001bd0| 6c 65 29 28 78 29 2a 28 | 31 2e 2f 36 35 35 33 36 |le)(x)*(|1./65536|
|00001be0| 2e 29 29 0d 0d 2f 2a 0d | 53 54 41 43 4b 0d 53 74 |.))../*.|STACK.St|
|00001bf0| 61 63 6b 47 72 6f 77 28 | 6e 29 20 69 6e 63 72 65 |ackGrow(|n) incre|
|00001c00| 61 73 65 73 20 74 68 65 | 20 73 74 61 63 6b 20 61 |ases the| stack a|
|00001c10| 6c 6c 6f 63 61 74 69 6f | 6e 20 62 79 20 6e 20 62 |llocatio|n by n b|
|00001c20| 79 74 65 73 2e 20 59 6f | 75 27 6c 6c 20 61 6c 73 |ytes. Yo|u'll als|
|00001c30| 6f 20 77 61 6e 74 20 74 | 6f 20 75 73 65 0d 41 70 |o want t|o use.Ap|
|00001c40| 70 6c 65 27 73 20 53 74 | 61 63 6b 53 70 61 63 65 |ple's St|ackSpace|
|00001c50| 28 29 2c 20 64 65 63 6c | 61 72 65 64 20 69 6e 20 |(), decl|ared in |
|00001c60| 4d 65 6d 6f 72 79 2e 68 | 2c 20 74 68 61 74 20 72 |Memory.h|, that r|
|00001c70| 65 74 75 72 6e 73 20 74 | 68 65 20 6e 75 6d 62 65 |eturns t|he numbe|
|00001c80| 72 20 6f 66 20 62 79 74 | 65 73 20 0d 61 6c 6c 6f |r of byt|es .allo|
|00001c90| 63 61 74 65 64 20 66 6f | 72 20 74 68 65 20 73 74 |cated fo|r the st|
|00001ca0| 61 63 6b 2e 0d 2a 2f 0d | 0d 23 64 65 66 69 6e 65 |ack..*/.|.#define|
|00001cb0| 20 53 74 61 63 6b 47 72 | 6f 77 28 65 78 74 72 61 | StackGr|ow(extra|
|00001cc0| 42 79 74 65 73 29 20 53 | 65 74 41 70 70 6c 4c 69 |Bytes) S|etApplLi|
|00001cd0| 6d 69 74 28 47 65 74 41 | 70 70 6c 4c 69 6d 69 74 |mit(GetA|pplLimit|
|00001ce0| 28 29 2d 28 65 78 74 72 | 61 42 79 74 65 73 29 29 |()-(extr|aBytes))|
|00001cf0| 0d 0d 2f 2a 20 42 69 6e | 6f 6d 69 61 6c 2e 63 20 |../* Bin|omial.c |
|00001d00| 2a 2f 0d 0d 6c 6f 6e 67 | 09 42 69 6e 6f 6d 69 61 |*/..long|.Binomia|
|00001d10| 6c 53 61 6d 70 6c 65 28 | 64 6f 75 62 6c 65 20 70 |lSample(|double p|
|00001d20| 2c 6c 6f 6e 67 20 6e 29 | 3b 0d 69 6e 74 09 09 42 |,long n)|;.int..B|
|00001d30| 69 6e 6f 6d 69 61 6c 53 | 61 6d 70 6c 65 51 75 69 |inomialS|ampleQui|
|00001d40| 63 6b 6c 79 28 69 6e 74 | 20 6e 29 3b 0d 64 6f 75 |ckly(int| n);.dou|
|00001d50| 62 6c 65 09 42 69 6e 6f | 6d 69 61 6c 4c 6f 77 65 |ble.Bino|mialLowe|
|00001d60| 72 42 6f 75 6e 64 28 64 | 6f 75 62 6c 65 20 50 2c |rBound(d|ouble P,|
|00001d70| 6c 6f 6e 67 20 6b 2c 6c | 6f 6e 67 20 6e 29 3b 0d |long k,l|ong n);.|
|00001d80| 64 6f 75 62 6c 65 09 42 | 69 6e 6f 6d 69 61 6c 55 |double.B|inomialU|
|00001d90| 70 70 65 72 42 6f 75 6e | 64 28 64 6f 75 62 6c 65 |pperBoun|d(double|
|00001da0| 20 50 2c 6c 6f 6e 67 20 | 6b 2c 6c 6f 6e 67 20 6e | P,long |k,long n|
|00001db0| 29 3b 0d 64 6f 75 62 6c | 65 09 42 69 6e 6f 6d 69 |);.doubl|e.Binomi|
|00001dc0| 61 6c 50 64 66 28 64 6f | 75 62 6c 65 20 70 2c 6c |alPdf(do|uble p,l|
|00001dd0| 6f 6e 67 20 6b 2c 6c 6f | 6e 67 20 6e 29 3b 0d 64 |ong k,lo|ng n);.d|
|00001de0| 6f 75 62 6c 65 09 42 69 | 6e 6f 6d 69 61 6c 28 64 |ouble.Bi|nomial(d|
|00001df0| 6f 75 62 6c 65 20 70 2c | 6c 6f 6e 67 20 6b 2c 6c |ouble p,|long k,l|
|00001e00| 6f 6e 67 20 6e 29 3b 0d | 64 6f 75 62 6c 65 09 49 |ong n);.|double.I|
|00001e10| 6e 63 6f 6d 70 6c 65 74 | 65 42 65 74 61 28 64 6f |ncomplet|eBeta(do|
|00001e20| 75 62 6c 65 20 78 2c 64 | 6f 75 62 6c 65 20 61 2c |uble x,d|ouble a,|
|00001e30| 64 6f 75 62 6c 65 20 62 | 29 3b 0d 64 6f 75 62 6c |double b|);.doubl|
|00001e40| 65 09 49 6e 76 65 72 73 | 65 42 69 6e 6f 6d 69 61 |e.Invers|eBinomia|
|00001e50| 6c 28 64 6f 75 62 6c 65 | 20 50 2c 6c 6f 6e 67 20 |l(double| P,long |
|00001e60| 6b 2c 6c 6f 6e 67 20 6e | 29 3b 0d 64 6f 75 62 6c |k,long n|);.doubl|
|00001e70| 65 09 49 6e 76 65 72 73 | 65 49 6e 63 6f 6d 70 6c |e.Invers|eIncompl|
|00001e80| 65 74 65 42 65 74 61 28 | 64 6f 75 62 6c 65 20 70 |eteBeta(|double p|
|00001e90| 2c 64 6f 75 62 6c 65 20 | 61 2c 64 6f 75 62 6c 65 |,double |a,double|
|00001ea0| 20 62 29 3b 0d 0d 2f 2a | 20 42 72 65 61 6b 4c 69 | b);../*| BreakLi|
|00001eb0| 6e 65 73 2e 63 20 2a 2f | 0d 0d 63 68 61 72 20 2a |nes.c */|..char *|
|00001ec0| 42 72 65 61 6b 4c 69 6e | 65 73 28 63 68 61 72 20 |BreakLin|es(char |
|00001ed0| 2a 73 74 72 69 6e 67 2c | 6c 6f 6e 67 20 6c 69 6e |*string,|long lin|
|00001ee0| 65 4c 65 6e 67 74 68 29 | 3b 0d 0d 2f 2a 20 43 61 |eLength)|;../* Ca|
|00001ef0| 72 64 53 6c 6f 74 2e 63 | 20 2a 2f 0d 0d 4f 53 45 |rdSlot.c| */..OSE|
|00001f00| 72 72 09 43 61 72 64 53 | 6c 6f 74 28 63 68 61 72 |rr.CardS|lot(char|
|00001f10| 20 2a 63 61 72 64 4e 61 | 6d 65 29 3b 0d 0d 2f 2a | *cardNa|me);../*|
|00001f20| 20 43 65 6e 74 65 72 52 | 65 63 74 49 6e 52 65 63 | CenterR|ectInRec|
|00001f30| 74 2e 63 20 2a 2f 0d 0d | 76 6f 69 64 09 43 65 6e |t.c */..|void.Cen|
|00001f40| 74 65 72 52 65 63 74 49 | 6e 52 65 63 74 28 52 65 |terRectI|nRect(Re|
|00001f50| 63 74 20 2a 6d 6f 76 65 | 61 62 6c 65 52 65 63 74 |ct *move|ableRect|
|00001f60| 50 74 72 2c 52 65 63 74 | 20 2a 66 69 78 65 64 52 |Ptr,Rect| *fixedR|
|00001f70| 65 63 74 50 74 72 29 3b | 0d 76 6f 69 64 09 4f 66 |ectPtr);|.void.Of|
|00001f80| 66 73 65 74 52 65 63 74 | 54 69 6c 65 28 52 65 63 |fsetRect|Tile(Rec|
|00001f90| 74 20 2a 72 2c 69 6e 74 | 20 6e 78 2c 69 6e 74 20 |t *r,int| nx,int |
|00001fa0| 6e 79 29 3b 0d 42 6f 6f | 6c 65 61 6e 09 52 65 63 |ny);.Boo|lean.Rec|
|00001fb0| 74 49 6e 52 65 63 74 28 | 52 65 63 74 20 2a 72 2c |tInRect(|Rect *r,|
|00001fc0| 52 65 63 74 20 2a 52 29 | 3b 0d 0d 2f 2a 20 43 68 |Rect *R)|;../* Ch|
|00001fd0| 69 53 71 75 61 72 65 2e | 63 20 2a 2f 0d 0d 64 6f |iSquare.|c */..do|
|00001fe0| 75 62 6c 65 09 50 43 68 | 69 53 71 75 61 72 65 20 |uble.PCh|iSquare |
|00001ff0| 28 64 6f 75 62 6c 65 20 | 63 68 69 53 71 75 61 72 |(double |chiSquar|
|00002000| 65 2c 69 6e 74 20 6e 29 | 3b 0d 0d 0d 2f 2a 20 43 |e,int n)|;.../* C|
|00002010| 6f 6e 76 6f 6c 76 65 58 | 2e 63 20 2a 2f 0d 0d 76 |onvolveX|.c */..v|
|00002020| 6f 69 64 09 43 6f 6e 76 | 6f 6c 76 65 58 28 64 6f |oid.Conv|olveX(do|
|00002030| 75 62 6c 65 20 66 5b 5d | 2c 69 6e 74 20 64 69 6d |uble f[]|,int dim|
|00002040| 2c 42 69 74 4d 61 70 20 | 2a 73 72 63 42 69 74 73 |,BitMap |*srcBits|
|00002050| 2c 42 69 74 4d 61 70 20 | 2a 64 73 74 42 69 74 73 |,BitMap |*dstBits|
|00002060| 2c 0d 09 09 09 52 65 63 | 74 20 2a 73 72 63 52 65 |,....Rec|t *srcRe|
|00002070| 63 74 50 74 72 2c 52 65 | 63 74 20 2a 64 73 74 52 |ctPtr,Re|ct *dstR|
|00002080| 65 63 74 50 74 72 29 3b | 0d 0d 2f 2a 20 43 6f 6e |ectPtr);|../* Con|
|00002090| 76 6f 6c 76 65 59 2e 63 | 20 2a 2f 0d 0d 76 6f 69 |volveY.c| */..voi|
|000020a0| 64 20 43 6f 6e 76 6f 6c | 76 65 59 28 64 6f 75 62 |d Convol|veY(doub|
|000020b0| 6c 65 20 66 5b 5d 2c 69 | 6e 74 20 64 69 6d 2c 42 |le f[],i|nt dim,B|
|000020c0| 69 74 4d 61 70 20 2a 73 | 72 63 42 69 74 73 2c 42 |itMap *s|rcBits,B|
|000020d0| 69 74 4d 61 70 20 2a 64 | 73 74 42 69 74 73 2c 0d |itMap *d|stBits,.|
|000020e0| 09 09 09 52 65 63 74 20 | 2a 73 72 63 52 65 63 74 |...Rect |*srcRect|
|000020f0| 50 74 72 2c 52 65 63 74 | 20 2a 64 73 74 52 65 63 |Ptr,Rect| *dstRec|
|00002100| 74 50 74 72 29 3b 0d 0d | 2f 2a 20 43 6f 70 79 42 |tPtr);..|/* CopyB|
|00002110| 69 74 73 51 75 69 63 6b | 6c 79 2e 63 20 2a 2f 0d |itsQuick|ly.c */.|
|00002120| 0d 65 6e 75 6d 7b 6d 75 | 6c 4f 76 65 72 3d 31 32 |.enum{mu|lOver=12|
|00002130| 38 7d 3b 0d 69 6e 74 09 | 43 6f 70 79 42 69 74 73 |8};.int.|CopyBits|
|00002140| 51 75 69 63 6b 6c 79 28 | 42 69 74 4d 61 70 20 2a |Quickly(|BitMap *|
|00002150| 73 72 63 42 69 74 73 2c | 42 69 74 4d 61 70 20 2a |srcBits,|BitMap *|
|00002160| 64 73 74 42 69 74 73 2c | 0d 09 09 09 52 65 63 74 |dstBits,|....Rect|
|00002170| 20 2a 73 72 63 52 65 63 | 74 50 74 72 2c 52 65 63 | *srcRec|tPtr,Rec|
|00002180| 74 20 2a 64 73 74 52 65 | 63 74 50 74 72 2c 69 6e |t *dstRe|ctPtr,in|
|00002190| 74 20 73 72 63 4d 6f 64 | 65 2c 52 67 6e 48 61 6e |t srcMod|e,RgnHan|
|000021a0| 64 6c 65 20 6d 61 73 6b | 52 67 6e 29 3b 0d 0d 2f |dle mask|Rgn);../|
|000021b0| 2a 20 43 6f 70 79 51 75 | 69 63 6b 44 72 61 77 47 |* CopyQu|ickDrawG|
|000021c0| 6c 6f 62 61 6c 73 2e 63 | 20 2a 2f 0d 0d 76 6f 69 |lobals.c| */..voi|
|000021d0| 64 20 43 6f 70 79 51 75 | 69 63 6b 44 72 61 77 47 |d CopyQu|ickDrawG|
|000021e0| 6c 6f 62 61 6c 73 28 76 | 6f 69 64 29 3b 0d 23 64 |lobals(v|oid);.#d|
|000021f0| 65 66 69 6e 65 20 43 6f | 70 79 51 75 69 63 6b 64 |efine Co|pyQuickd|
|00002200| 72 61 77 47 6c 6f 62 61 | 6c 73 20 43 6f 70 79 51 |rawGloba|ls CopyQ|
|00002210| 75 69 63 6b 44 72 61 77 | 47 6c 6f 62 61 6c 73 09 |uickDraw|Globals.|
|00002220| 2f 2f 20 6f 6c 64 20 73 | 70 65 6c 6c 69 6e 67 0d |// old s|pelling.|
|00002230| 0d 2f 2a 20 43 72 65 61 | 74 65 54 72 69 61 6c 53 |./* Crea|teTrialS|
|00002240| 6e 64 73 2e 63 20 2a 2f | 0d 0d 76 6f 69 64 20 43 |nds.c */|..void C|
|00002250| 72 65 61 74 65 54 72 69 | 61 6c 53 6e 64 73 28 76 |reateTri|alSnds(v|
|00002260| 6f 69 64 29 3b 0d 0d 2f | 2a 20 44 61 74 65 53 74 |oid);../|* DateSt|
|00002270| 72 69 6e 67 2e 63 20 2a | 2f 0d 0d 63 68 61 72 09 |ring.c *|/..char.|
|00002280| 2a 44 61 74 65 53 74 72 | 69 6e 67 28 75 6e 73 69 |*DateStr|ing(unsi|
|00002290| 67 6e 65 64 20 6c 6f 6e | 67 20 73 65 63 6f 6e 64 |gned lon|g second|
|000022a0| 73 29 3b 0d 0d 2f 2a 20 | 44 72 61 77 50 72 69 6e |s);../* |DrawPrin|
|000022b0| 74 66 2e 63 20 2a 2f 0d | 0d 76 6f 69 64 20 44 72 |tf.c */.|.void Dr|
|000022c0| 61 77 50 72 69 6e 74 66 | 28 63 68 61 72 20 2a 73 |awPrintf|(char *s|
|000022d0| 2c 20 2e 2e 2e 29 3b 0d | 0d 2f 2a 20 66 66 70 72 |, ...);.|./* ffpr|
|000022e0| 69 6e 74 66 2e 63 20 2a | 2f 0d 0d 69 6e 74 20 66 |intf.c *|/..int f|
|000022f0| 66 70 72 69 6e 74 66 28 | 46 49 4c 45 20 2a 73 74 |fprintf(|FILE *st|
|00002300| 72 65 61 6d 5b 32 5d 2c | 63 68 61 72 20 2a 66 6f |ream[2],|char *fo|
|00002310| 72 6d 61 74 2c 2e 2e 2e | 29 3b 0d 0d 2f 2a 20 46 |rmat,...|);../* F|
|00002320| 6c 75 73 68 43 61 63 68 | 65 52 61 6e 67 65 2e 63 |lushCach|eRange.c|
|00002330| 20 2a 2f 0d 0d 76 6f 69 | 64 20 46 6c 75 73 68 43 | */..voi|d FlushC|
|00002340| 61 63 68 65 52 61 6e 67 | 65 20 28 76 6f 69 64 20 |acheRang|e (void |
|00002350| 2a 61 64 64 72 65 73 73 | 2c 20 75 6e 73 69 67 6e |*address|, unsign|
|00002360| 65 64 20 6c 6f 6e 67 20 | 63 6f 75 6e 74 29 3b 0d |ed long |count);.|
|00002370| 0d 2f 2a 20 47 44 4f 70 | 65 6e 57 69 6e 64 6f 77 |./* GDOp|enWindow|
|00002380| 2e 63 20 2a 2f 0d 0d 76 | 6f 69 64 20 41 64 64 45 |.c */..v|oid AddE|
|00002390| 78 70 6c 69 63 69 74 50 | 61 6c 65 74 74 65 28 57 |xplicitP|alette(W|
|000023a0| 69 6e 64 6f 77 50 74 72 | 20 77 69 6e 64 6f 77 29 |indowPtr| window)|
|000023b0| 3b 0d 57 69 6e 64 6f 77 | 50 74 72 20 47 44 4f 70 |;.Window|Ptr GDOp|
|000023c0| 65 6e 57 69 6e 64 6f 77 | 31 28 47 44 48 61 6e 64 |enWindow|1(GDHand|
|000023d0| 6c 65 20 64 65 76 69 63 | 65 29 3b 0d 76 6f 69 64 |le devic|e);.void|
|000023e0| 20 47 44 44 69 73 70 6f | 73 65 57 69 6e 64 6f 77 | GDDispo|seWindow|
|000023f0| 31 28 57 69 6e 64 6f 77 | 50 74 72 20 77 69 6e 64 |1(Window|Ptr wind|
|00002400| 6f 77 29 3b 0d 43 57 69 | 6e 64 6f 77 50 74 72 20 |ow);.CWi|ndowPtr |
|00002410| 47 44 4f 70 65 6e 57 69 | 6e 64 6f 77 28 47 44 48 |GDOpenWi|ndow(GDH|
|00002420| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 29 3b 09 09 |andle de|vice);..|
|00002430| 09 09 09 2f 2f 20 4f 6c | 64 2e 20 55 73 65 20 47 |...// Ol|d. Use G|
|00002440| 44 2e 2e 2e 31 20 69 6e | 73 74 65 61 64 2e 0d 76 |D...1 in|stead..v|
|00002450| 6f 69 64 20 47 44 44 69 | 73 70 6f 73 65 57 69 6e |oid GDDi|sposeWin|
|00002460| 64 6f 77 28 47 44 48 61 | 6e 64 6c 65 20 64 65 76 |dow(GDHa|ndle dev|
|00002470| 69 63 65 2c 43 57 69 6e | 64 6f 77 50 74 72 20 6d |ice,CWin|dowPtr m|
|00002480| 79 57 69 6e 64 6f 77 29 | 3b 09 2f 2f 20 4f 6c 64 |yWindow)|;.// Old|
|00002490| 2e 20 55 73 65 20 47 44 | 2e 2e 2e 31 20 69 6e 73 |. Use GD|...1 ins|
|000024a0| 74 65 61 64 2e 0d 0d 2f | 2a 20 47 44 50 72 69 6e |tead.../|* GDPrin|
|000024b0| 74 66 2e 63 20 2a 2f 0d | 0d 76 6f 69 64 09 47 44 |tf.c */.|.void.GD|
|000024c0| 50 72 69 6e 74 66 28 63 | 68 61 72 20 2a 73 2c 20 |Printf(c|har *s, |
|000024d0| 2e 2e 2e 29 3b 0d 0d 2f | 2a 20 47 44 46 72 61 6d |...);../|* GDFram|
|000024e0| 65 52 61 74 65 2e 63 20 | 2a 2f 0d 0d 64 6f 75 62 |eRate.c |*/..doub|
|000024f0| 6c 65 20 47 44 43 6c 75 | 74 55 70 64 61 74 65 52 |le GDClu|tUpdateR|
|00002500| 61 74 65 28 47 44 48 61 | 6e 64 6c 65 20 64 65 76 |ate(GDHa|ndle dev|
|00002510| 69 63 65 2c 6c 6f 6e 67 | 20 63 6c 75 74 45 6e 74 |ice,long| clutEnt|
|00002520| 72 69 65 73 29 3b 09 2f | 2f 20 55 73 65 20 47 44 |ries);./|/ Use GD|
|00002530| 54 69 6d 65 43 6c 75 74 | 55 70 64 61 74 65 20 69 |TimeClut|Update i|
|00002540| 6e 73 74 65 61 64 2e 0d | 64 6f 75 62 6c 65 20 47 |nstead..|double G|
|00002550| 44 46 72 61 6d 65 52 61 | 74 65 28 47 44 48 61 6e |DFrameRa|te(GDHan|
|00002560| 64 6c 65 20 64 65 76 69 | 63 65 29 3b 0d 64 6f 75 |dle devi|ce);.dou|
|00002570| 62 6c 65 20 47 44 46 72 | 61 6d 65 73 50 65 72 43 |ble GDFr|amesPerC|
|00002580| 6c 75 74 55 70 64 61 74 | 65 28 47 44 48 61 6e 64 |lutUpdat|e(GDHand|
|00002590| 6c 65 20 64 65 76 69 63 | 65 2c 6c 6f 6e 67 20 63 |le devic|e,long c|
|000025a0| 6c 75 74 45 6e 74 72 69 | 65 73 29 3b 09 2f 2f 20 |lutEntri|es);.// |
|000025b0| 55 73 65 20 47 44 54 69 | 6d 65 43 6c 75 74 55 70 |Use GDTi|meClutUp|
|000025c0| 64 61 74 65 20 69 6e 73 | 74 65 61 64 2e 0d 64 6f |date ins|tead..do|
|000025d0| 75 62 6c 65 20 47 44 4d | 6f 76 69 65 52 61 74 65 |uble GDM|ovieRate|
|000025e0| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|000025f0| 2c 69 6e 74 20 71 75 69 | 63 6b 6c 79 29 3b 0d 64 |,int qui|ckly);.d|
|00002600| 6f 75 62 6c 65 20 47 44 | 4d 6f 76 69 65 53 69 7a |ouble GD|MovieSiz|
|00002610| 65 28 47 44 48 61 6e 64 | 6c 65 20 64 65 76 69 63 |e(GDHand|le devic|
|00002620| 65 2c 69 6e 74 20 71 75 | 69 63 6b 6c 79 29 3b 0d |e,int qu|ickly);.|
|00002630| 76 6f 69 64 20 47 44 54 | 69 6d 65 43 6c 75 74 55 |void GDT|imeClutU|
|00002640| 70 64 61 74 65 28 47 44 | 48 61 6e 64 6c 65 20 64 |pdate(GD|Handle d|
|00002650| 65 76 69 63 65 2c 6c 6f | 6e 67 20 63 6c 75 74 45 |evice,lo|ng clutE|
|00002660| 6e 74 72 69 65 73 2c 64 | 6f 75 62 6c 65 20 2a 66 |ntries,d|ouble *f|
|00002670| 72 61 6d 65 73 50 74 72 | 2c 64 6f 75 62 6c 65 20 |ramesPtr|,double |
|00002680| 2a 73 50 74 72 29 3b 0d | 64 6f 75 62 6c 65 20 47 |*sPtr);.|double G|
|00002690| 44 56 42 4c 52 61 74 65 | 28 47 44 48 61 6e 64 6c |DVBLRate|(GDHandl|
|000026a0| 65 20 64 65 76 69 63 65 | 29 3b 0d 64 6f 75 62 6c |e device|);.doubl|
|000026b0| 65 20 54 69 63 6b 52 61 | 74 65 28 76 6f 69 64 29 |e TickRa|te(void)|
|000026c0| 3b 0d 0d 2f 2a 20 47 44 | 54 69 6d 65 43 6c 75 74 |;../* GD|TimeClut|
|000026d0| 2e 63 20 2a 2f 0d 0d 74 | 79 70 65 64 65 66 20 4f |.c */..t|ypedef O|
|000026e0| 53 45 72 72 20 28 2a 53 | 65 74 45 6e 74 72 69 65 |SErr (*S|etEntrie|
|000026f0| 73 46 75 6e 63 74 69 6f | 6e 29 28 47 44 48 61 6e |sFunctio|n)(GDHan|
|00002700| 64 6c 65 20 64 65 76 69 | 63 65 2c 73 68 6f 72 74 |dle devi|ce,short|
|00002710| 20 73 74 61 72 74 2c 73 | 68 6f 72 74 20 63 6f 75 | start,s|hort cou|
|00002720| 6e 74 0d 09 2c 43 6f 6c | 6f 72 53 70 65 63 20 2a |nt..,Col|orSpec *|
|00002730| 61 54 61 62 6c 65 29 3b | 0d 4f 53 45 72 72 20 47 |aTable);|.OSErr G|
|00002740| 44 54 69 6d 65 43 6c 75 | 74 28 47 44 48 61 6e 64 |DTimeClu|t(GDHand|
|00002750| 6c 65 20 64 65 76 69 63 | 65 2c 53 65 74 45 6e 74 |le devic|e,SetEnt|
|00002760| 72 69 65 73 46 75 6e 63 | 74 69 6f 6e 20 66 75 6e |riesFunc|tion fun|
|00002770| 63 74 69 6f 6e 2c 73 68 | 6f 72 74 20 63 6c 75 74 |ction,sh|ort clut|
|00002780| 45 6e 74 72 69 65 73 0d | 09 2c 64 6f 75 62 6c 65 |Entries.|.,double|
|00002790| 20 2a 73 50 74 72 2c 64 | 6f 75 62 6c 65 20 2a 66 | *sPtr,d|ouble *f|
|000027a0| 72 61 6d 65 73 50 74 72 | 2c 64 6f 75 62 6c 65 20 |ramesPtr|,double |
|000027b0| 2a 6d 69 73 73 69 6e 67 | 46 72 61 6d 65 73 50 74 |*missing|FramesPt|
|000027c0| 72 2c 64 6f 75 62 6c 65 | 20 2a 66 72 61 6d 65 52 |r,double| *frameR|
|000027d0| 61 74 65 50 74 72 29 3b | 0d 0d 2f 2a 20 47 44 56 |atePtr);|../* GDV|
|000027e0| 69 64 65 6f 2e 63 20 2a | 2f 0d 0d 23 64 65 66 69 |ideo.c *|/..#defi|
|000027f0| 6e 65 20 4d 41 58 5f 53 | 43 52 45 45 4e 53 20 38 |ne MAX_S|CREENS 8|
|00002800| 0d 63 68 61 72 20 20 2a | 47 44 43 61 72 64 4e 61 |.char *|GDCardNa|
|00002810| 6d 65 28 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |me(GDHan|dle devi|
|00002820| 63 65 29 3b 0d 73 68 6f | 72 74 20 47 44 43 6c 75 |ce);.sho|rt GDClu|
|00002830| 74 53 69 7a 65 28 47 44 | 48 61 6e 64 6c 65 20 64 |tSize(GD|Handle d|
|00002840| 65 76 69 63 65 29 3b 0d | 4f 53 45 72 72 20 47 44 |evice);.|OSErr GD|
|00002850| 43 6f 6e 74 72 6f 6c 28 | 69 6e 74 20 72 65 66 4e |Control(|int refN|
|00002860| 75 6d 2c 69 6e 74 20 63 | 73 43 6f 64 65 2c 50 74 |um,int c|sCode,Pt|
|00002870| 72 20 63 73 50 61 72 61 | 6d 50 74 72 29 3b 0d 4f |r csPara|mPtr);.O|
|00002880| 53 45 72 72 20 47 44 44 | 69 72 65 63 74 53 65 74 |SErr GDD|irectSet|
|00002890| 45 6e 74 72 69 65 73 28 | 47 44 48 61 6e 64 6c 65 |Entries(|GDHandle|
|000028a0| 20 64 65 76 69 63 65 2c | 73 68 6f 72 74 20 73 74 | device,|short st|
|000028b0| 61 72 74 2c 73 68 6f 72 | 74 20 63 6f 75 6e 74 2c |art,shor|t count,|
|000028c0| 43 6f 6c 6f 72 53 70 65 | 63 20 2a 61 54 61 62 6c |ColorSpe|c *aTabl|
|000028d0| 65 29 3b 0d 4f 53 45 72 | 72 20 47 44 47 65 74 44 |e);.OSEr|r GDGetD|
|000028e0| 65 66 61 75 6c 74 47 61 | 6d 6d 61 28 47 44 48 61 |efaultGa|mma(GDHa|
|000028f0| 6e 64 6c 65 20 64 65 76 | 69 63 65 2c 47 61 6d 6d |ndle dev|ice,Gamm|
|00002900| 61 54 62 6c 20 2a 2a 67 | 61 6d 6d 61 54 62 6c 29 |aTbl **g|ammaTbl)|
|00002910| 3b 0d 4f 53 45 72 72 20 | 47 44 47 65 74 44 65 66 |;.OSErr |GDGetDef|
|00002920| 61 75 6c 74 4d 6f 64 65 | 28 47 44 48 61 6e 64 6c |aultMode|(GDHandl|
|00002930| 65 20 64 65 76 69 63 65 | 2c 73 68 6f 72 74 20 2a |e device|,short *|
|00002940| 6d 6f 64 65 50 74 72 29 | 3b 0d 4f 53 45 72 72 20 |modePtr)|;.OSErr |
|00002950| 47 44 47 65 74 45 6e 74 | 72 69 65 73 28 47 44 48 |GDGetEnt|ries(GDH|
|00002960| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 2c 73 68 6f |andle de|vice,sho|
|00002970| 72 74 20 73 74 61 72 74 | 2c 73 68 6f 72 74 20 63 |rt start|,short c|
|00002980| 6f 75 6e 74 2c 43 6f 6c | 6f 72 53 70 65 63 20 2a |ount,Col|orSpec *|
|00002990| 61 54 61 62 6c 65 29 3b | 0d 4f 53 45 72 72 20 47 |aTable);|.OSErr G|
|000029a0| 44 47 65 74 47 61 6d 6d | 61 28 47 44 48 61 6e 64 |DGetGamm|a(GDHand|
|000029b0| 6c 65 20 64 65 76 69 63 | 65 2c 47 61 6d 6d 61 54 |le devic|e,GammaT|
|000029c0| 62 6c 20 2a 2a 6d 79 47 | 61 6d 6d 61 54 62 6c 48 |bl **myG|ammaTblH|
|000029d0| 61 6e 64 6c 65 29 3b 0d | 4f 53 45 72 72 20 47 44 |andle);.|OSErr GD|
|000029e0| 47 65 74 47 72 61 79 28 | 47 44 48 61 6e 64 6c 65 |GetGray(|GDHandle|
|000029f0| 20 64 65 76 69 63 65 2c | 42 6f 6f 6c 65 61 6e 20 | device,|Boolean |
|00002a00| 2a 66 6c 61 67 50 74 72 | 29 3b 0d 4f 53 45 72 72 |*flagPtr|);.OSErr|
|00002a10| 20 47 44 47 65 74 49 6e | 74 65 72 72 75 70 74 28 | GDGetIn|terrupt(|
|00002a20| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 2c |GDHandle| device,|
|00002a30| 42 6f 6f 6c 65 61 6e 20 | 2a 66 6c 61 67 50 74 72 |Boolean |*flagPtr|
|00002a40| 29 3b 0d 4f 53 45 72 72 | 20 47 44 47 65 74 4d 6f |);.OSErr| GDGetMo|
|00002a50| 64 65 28 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |de(GDHan|dle devi|
|00002a60| 63 65 2c 73 68 6f 72 74 | 20 2a 6d 6f 64 65 50 74 |ce,short| *modePt|
|00002a70| 72 2c 73 68 6f 72 74 20 | 2a 70 61 67 65 50 74 72 |r,short |*pagePtr|
|00002a80| 2c 50 74 72 20 2a 62 61 | 73 65 41 64 64 72 50 74 |,Ptr *ba|seAddrPt|
|00002a90| 72 29 3b 0d 4f 53 45 72 | 72 20 47 44 47 65 74 50 |r);.OSEr|r GDGetP|
|00002aa0| 61 67 65 42 61 73 65 28 | 47 44 48 61 6e 64 6c 65 |ageBase(|GDHandle|
|00002ab0| 20 64 65 76 69 63 65 2c | 73 68 6f 72 74 20 70 61 | device,|short pa|
|00002ac0| 67 65 2c 50 74 72 20 2a | 62 61 73 65 41 64 64 72 |ge,Ptr *|baseAddr|
|00002ad0| 50 74 72 29 3b 0d 4f 53 | 45 72 72 20 47 44 47 65 |Ptr);.OS|Err GDGe|
|00002ae0| 74 50 61 67 65 43 6e 74 | 28 47 44 48 61 6e 64 6c |tPageCnt|(GDHandl|
|00002af0| 65 20 64 65 76 69 63 65 | 2c 73 68 6f 72 74 20 6d |e device|,short m|
|00002b00| 6f 64 65 2c 73 68 6f 72 | 74 20 2a 70 61 67 65 73 |ode,shor|t *pages|
|00002b10| 50 74 72 29 3b 0d 4f 53 | 45 72 72 20 47 44 47 72 |Ptr);.OS|Err GDGr|
|00002b20| 61 79 50 61 67 65 28 47 | 44 48 61 6e 64 6c 65 20 |ayPage(G|DHandle |
|00002b30| 64 65 76 69 63 65 2c 73 | 68 6f 72 74 20 70 61 67 |device,s|hort pag|
|00002b40| 65 29 3b 0d 23 64 65 66 | 69 6e 65 20 47 44 4c 69 |e);.#def|ine GDLi|
|00002b50| 6e 65 61 72 47 61 6d 6d | 61 20 47 44 55 6e 63 6f |nearGamm|a GDUnco|
|00002b60| 72 72 65 63 74 65 64 47 | 61 6d 6d 61 20 2f 2a 20 |rrectedG|amma /* |
|00002b70| 6f 6c 64 20 6e 61 6d 65 | 2c 20 62 65 66 6f 72 65 |old name|, before|
|00002b80| 20 31 32 2f 31 36 2f 39 | 32 20 2a 2f 0d 63 68 61 | 12/16/9|2 */.cha|
|00002b90| 72 20 2a 47 44 4d 6f 64 | 65 4e 61 6d 65 28 73 68 |r *GDMod|eName(sh|
|00002ba0| 6f 72 74 20 6d 6f 64 65 | 29 3b 0d 75 6e 73 69 67 |ort mode|);.unsig|
|00002bb0| 6e 65 64 20 63 68 61 72 | 20 2a 47 44 4e 61 6d 65 |ned char| *GDName|
|00002bc0| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00002bd0| 29 3b 0d 4f 53 45 72 72 | 20 47 44 52 65 73 65 74 |);.OSErr| GDReset|
|00002be0| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00002bf0| 2c 73 68 6f 72 74 20 2a | 6d 6f 64 65 50 74 72 2c |,short *|modePtr,|
|00002c00| 73 68 6f 72 74 20 2a 70 | 61 67 65 50 74 72 2c 50 |short *p|agePtr,P|
|00002c10| 74 72 20 2a 62 61 73 65 | 41 64 64 72 50 74 72 29 |tr *base|AddrPtr)|
|00002c20| 3b 0d 4f 53 45 72 72 20 | 47 44 52 65 73 74 6f 72 |;.OSErr |GDRestor|
|00002c30| 65 44 65 76 69 63 65 43 | 6c 75 74 28 47 44 48 61 |eDeviceC|lut(GDHa|
|00002c40| 6e 64 6c 65 20 64 65 76 | 69 63 65 29 3b 0d 4f 53 |ndle dev|ice);.OS|
|00002c50| 45 72 72 20 47 44 52 65 | 73 74 6f 72 65 47 61 6d |Err GDRe|storeGam|
|00002c60| 6d 61 28 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |ma(GDHan|dle devi|
|00002c70| 63 65 29 3b 0d 4f 53 45 | 72 72 20 47 44 53 61 76 |ce);.OSE|rr GDSav|
|00002c80| 65 47 61 6d 6d 61 28 47 | 44 48 61 6e 64 6c 65 20 |eGamma(G|DHandle |
|00002c90| 64 65 76 69 63 65 29 3b | 0d 4f 53 45 72 72 20 47 |device);|.OSErr G|
|00002ca0| 44 53 65 74 44 65 66 61 | 75 6c 74 4d 6f 64 65 28 |DSetDefa|ultMode(|
|00002cb0| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 2c |GDHandle| device,|
|00002cc0| 73 68 6f 72 74 20 6d 6f | 64 65 29 3b 0d 4f 53 45 |short mo|de);.OSE|
|00002cd0| 72 72 20 47 44 53 65 74 | 45 6e 74 72 69 65 73 28 |rr GDSet|Entries(|
|00002ce0| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 2c |GDHandle| device,|
|00002cf0| 73 68 6f 72 74 20 73 74 | 61 72 74 2c 73 68 6f 72 |short st|art,shor|
|00002d00| 74 20 63 6f 75 6e 74 2c | 43 6f 6c 6f 72 53 70 65 |t count,|ColorSpe|
|00002d10| 63 20 2a 61 54 61 62 6c | 65 29 3b 0d 4f 53 45 72 |c *aTabl|e);.OSEr|
|00002d20| 72 20 47 44 53 65 74 45 | 6e 74 72 69 65 73 42 79 |r GDSetE|ntriesBy|
|00002d30| 54 79 70 65 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |Type(GDH|andle de|
|00002d40| 76 69 63 65 2c 73 68 6f | 72 74 20 73 74 61 72 74 |vice,sho|rt start|
|00002d50| 2c 73 68 6f 72 74 20 63 | 6f 75 6e 74 2c 43 6f 6c |,short c|ount,Col|
|00002d60| 6f 72 53 70 65 63 20 2a | 74 61 62 6c 65 29 3b 0d |orSpec *|table);.|
|00002d70| 4f 53 45 72 72 20 47 44 | 53 65 74 45 6e 74 72 69 |OSErr GD|SetEntri|
|00002d80| 65 73 42 79 54 79 70 65 | 48 69 67 68 50 72 69 6f |esByType|HighPrio|
|00002d90| 72 69 74 79 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |rity(GDH|andle de|
|00002da0| 76 69 63 65 2c 73 68 6f | 72 74 20 73 74 61 72 74 |vice,sho|rt start|
|00002db0| 2c 73 68 6f 72 74 20 63 | 6f 75 6e 74 0d 09 2c 43 |,short c|ount..,C|
|00002dc0| 6f 6c 6f 72 53 70 65 63 | 20 2a 74 61 62 6c 65 29 |olorSpec| *table)|
|00002dd0| 3b 0d 4f 53 45 72 72 20 | 47 44 53 65 74 47 61 6d |;.OSErr |GDSetGam|
|00002de0| 6d 61 28 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |ma(GDHan|dle devi|
|00002df0| 63 65 2c 47 61 6d 6d 61 | 54 62 6c 20 2a 6d 79 47 |ce,Gamma|Tbl *myG|
|00002e00| 61 6d 6d 61 54 62 6c 50 | 74 72 29 3b 0d 4f 53 45 |ammaTblP|tr);.OSE|
|00002e10| 72 72 20 47 44 53 65 74 | 47 72 61 79 28 47 44 48 |rr GDSet|Gray(GDH|
|00002e20| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 2c 42 6f 6f |andle de|vice,Boo|
|00002e30| 6c 65 61 6e 20 66 6c 61 | 67 29 3b 0d 4f 53 45 72 |lean fla|g);.OSEr|
|00002e40| 72 20 47 44 53 65 74 49 | 6e 74 65 72 72 75 70 74 |r GDSetI|nterrupt|
|00002e50| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00002e60| 2c 42 6f 6f 6c 65 61 6e | 20 66 6c 61 67 29 3b 0d |,Boolean| flag);.|
|00002e70| 4f 53 45 72 72 20 47 44 | 53 65 74 4d 6f 64 65 28 |OSErr GD|SetMode(|
|00002e80| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 2c |GDHandle| device,|
|00002e90| 73 68 6f 72 74 20 6d 6f | 64 65 2c 73 68 6f 72 74 |short mo|de,short|
|00002ea0| 20 70 61 67 65 2c 50 74 | 72 20 2a 62 61 73 65 41 | page,Pt|r *baseA|
|00002eb0| 64 64 72 50 74 72 29 3b | 0d 4f 53 45 72 72 20 47 |ddrPtr);|.OSErr G|
|00002ec0| 44 53 65 74 50 61 67 65 | 44 72 61 77 6e 28 47 44 |DSetPage|Drawn(GD|
|00002ed0| 48 61 6e 64 6c 65 20 64 | 65 76 69 63 65 2c 73 68 |Handle d|evice,sh|
|00002ee0| 6f 72 74 20 70 61 67 65 | 29 3b 0d 4f 53 45 72 72 |ort page|);.OSErr|
|00002ef0| 20 47 44 53 65 74 50 61 | 67 65 53 68 6f 77 6e 28 | GDSetPa|geShown(|
|00002f00| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 2c |GDHandle| device,|
|00002f10| 73 68 6f 72 74 20 70 61 | 67 65 29 3b 0d 4f 53 45 |short pa|ge);.OSE|
|00002f20| 72 72 20 47 44 53 74 61 | 74 75 73 28 69 6e 74 20 |rr GDSta|tus(int |
|00002f30| 72 65 66 4e 75 6d 2c 69 | 6e 74 20 63 73 43 6f 64 |refNum,i|nt csCod|
|00002f40| 65 2c 50 74 72 20 63 73 | 50 61 72 61 6d 50 74 72 |e,Ptr cs|ParamPtr|
|00002f50| 29 3b 0d 4f 53 45 72 72 | 20 47 44 55 6e 63 6f 72 |);.OSErr| GDUncor|
|00002f60| 72 65 63 74 65 64 47 61 | 6d 6d 61 28 47 44 48 61 |rectedGa|mma(GDHa|
|00002f70| 6e 64 6c 65 20 64 65 76 | 69 63 65 29 3b 0d 69 6e |ndle dev|ice);.in|
|00002f80| 74 20 20 47 44 56 65 72 | 73 69 6f 6e 28 47 44 48 |t GDVer|sion(GDH|
|00002f90| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 29 3b 0d 23 |andle de|vice);.#|
|00002fa0| 64 65 66 69 6e 65 20 4d | 6f 64 65 4e 61 6d 65 20 |define M|odeName |
|00002fb0| 47 44 4d 6f 64 65 4e 61 | 6d 65 20 20 20 2f 2a 20 |GDModeNa|me /* |
|00002fc0| 6f 6c 64 20 6e 61 6d 65 | 2c 20 62 65 66 6f 72 65 |old name|, before|
|00002fd0| 20 31 2f 31 38 2f 39 33 | 20 2a 2f 0d 69 6e 74 20 | 1/18/93| */.int |
|00002fe0| 20 50 61 74 63 68 4d 61 | 63 49 49 63 69 56 69 64 | PatchMa|cIIciVid|
|00002ff0| 65 6f 44 72 69 76 65 72 | 28 76 6f 69 64 29 3b 0d |eoDriver|(void);.|
|00003000| 0d 2f 2a 20 47 65 74 43 | 6c 69 63 6b 73 2e 63 20 |./* GetC|licks.c |
|00003010| 2a 2f 0d 0d 73 68 6f 72 | 74 09 47 65 74 43 6c 69 |*/..shor|t.GetCli|
|00003020| 63 6b 73 28 76 6f 69 64 | 29 3b 0d 0d 2f 2a 20 47 |cks(void|);../* G|
|00003030| 65 74 53 63 72 65 65 6e | 44 65 76 69 63 65 2e 63 |etScreen|Device.c|
|00003040| 20 2a 2f 0d 0d 47 44 48 | 61 6e 64 6c 65 09 47 65 | */..GDH|andle.Ge|
|00003050| 74 53 63 72 65 65 6e 44 | 65 76 69 63 65 28 69 6e |tScreenD|evice(in|
|00003060| 74 20 6e 29 3b 0d 69 6e | 74 20 47 65 74 53 63 72 |t n);.in|t GetScr|
|00003070| 65 65 6e 49 6e 64 65 78 | 28 47 44 48 61 6e 64 6c |eenIndex|(GDHandl|
|00003080| 65 20 64 65 76 69 63 65 | 29 3b 0d 47 44 48 61 6e |e device|);.GDHan|
|00003090| 64 6c 65 09 47 65 74 57 | 69 6e 64 6f 77 44 65 76 |dle.GetW|indowDev|
|000030a0| 69 63 65 28 57 69 6e 64 | 6f 77 50 74 72 20 74 68 |ice(Wind|owPtr th|
|000030b0| 65 57 69 6e 64 6f 77 29 | 3b 0d 47 44 48 61 6e 64 |eWindow)|;.GDHand|
|000030c0| 6c 65 09 41 64 64 72 65 | 73 73 54 6f 53 63 72 65 |le.Addre|ssToScre|
|000030d0| 65 6e 44 65 76 69 63 65 | 28 50 74 72 20 61 64 64 |enDevice|(Ptr add|
|000030e0| 72 65 73 73 29 3b 0d 47 | 44 48 61 6e 64 6c 65 09 |ress);.G|DHandle.|
|000030f0| 53 6c 6f 74 54 6f 53 63 | 72 65 65 6e 44 65 76 69 |SlotToSc|reenDevi|
|00003100| 63 65 28 69 6e 74 20 6e | 29 3b 0d 73 68 6f 72 74 |ce(int n|);.short|
|00003110| 20 69 6e 74 09 47 65 74 | 44 65 76 69 63 65 53 6c | int.Get|DeviceSl|
|00003120| 6f 74 28 47 44 48 61 6e | 64 6c 65 20 64 65 76 69 |ot(GDHan|dle devi|
|00003130| 63 65 29 3b 0d 73 68 6f | 72 74 20 69 6e 74 09 41 |ce);.sho|rt int.A|
|00003140| 64 64 72 65 73 73 54 6f | 53 6c 6f 74 28 50 74 72 |ddressTo|Slot(Ptr|
|00003150| 20 61 64 64 72 65 73 73 | 29 3b 0d 76 6f 69 64 09 | address|);.void.|
|00003160| 09 4c 6f 63 61 6c 54 6f | 47 6c 6f 62 61 6c 52 65 |.LocalTo|GlobalRe|
|00003170| 63 74 28 52 65 63 74 20 | 2a 72 29 3b 0d 76 6f 69 |ct(Rect |*r);.voi|
|00003180| 64 09 09 47 6c 6f 62 61 | 6c 54 6f 4c 6f 63 61 6c |d..Globa|lToLocal|
|00003190| 52 65 63 74 28 52 65 63 | 74 20 2a 72 29 3b 0d 0d |Rect(Rec|t *r);..|
|000031a0| 0d 2f 2a 20 47 65 74 56 | 6f 6c 74 61 67 65 2e 63 |./* GetV|oltage.c|
|000031b0| 20 2a 2f 0d 0d 64 6f 75 | 62 6c 65 09 56 6f 6c 74 | */..dou|ble.Volt|
|000031c0| 73 44 75 72 69 6e 67 46 | 72 61 6d 65 28 64 6f 75 |sDuringF|rame(dou|
|000031d0| 62 6c 65 20 66 72 61 6d | 65 73 29 3b 0d 64 6f 75 |ble fram|es);.dou|
|000031e0| 62 6c 65 09 47 65 74 56 | 6f 6c 74 61 67 65 28 73 |ble.GetV|oltage(s|
|000031f0| 68 6f 72 74 20 63 68 61 | 6e 6e 65 6c 2c 64 6f 75 |hort cha|nnel,dou|
|00003200| 62 6c 65 20 2a 67 61 69 | 6e 50 74 72 2c 64 6f 75 |ble *gai|nPtr,dou|
|00003210| 62 6c 65 20 2a 66 72 65 | 71 75 65 6e 63 79 50 74 |ble *fre|quencyPt|
|00003220| 72 2c 6c 6f 6e 67 20 6e | 0d 09 09 09 2c 64 6f 75 |r,long n|....,dou|
|00003230| 62 6c 65 20 2a 73 64 50 | 74 72 29 3b 0d 73 68 6f |ble *sdP|tr);.sho|
|00003240| 72 74 09 47 65 74 56 6f | 6c 74 61 67 65 73 28 73 |rt.GetVo|ltages(s|
|00003250| 68 6f 72 74 20 63 68 61 | 6e 6e 65 6c 2c 64 6f 75 |hort cha|nnel,dou|
|00003260| 62 6c 65 20 2a 67 61 69 | 6e 50 74 72 2c 64 6f 75 |ble *gai|nPtr,dou|
|00003270| 62 6c 65 20 2a 66 72 65 | 71 75 65 6e 63 79 50 74 |ble *fre|quencyPt|
|00003280| 72 2c 6c 6f 6e 67 20 2a | 6e 50 74 72 0d 09 09 09 |r,long *|nPtr....|
|00003290| 2c 75 6e 73 69 67 6e 65 | 64 20 73 68 6f 72 74 20 |,unsigne|d short |
|000032a0| 72 65 61 64 69 6e 67 73 | 5b 5d 2c 64 6f 75 62 6c |readings|[],doubl|
|000032b0| 65 20 2a 76 6f 6c 74 44 | 65 6c 74 61 50 74 72 2c |e *voltD|eltaPtr,|
|000032c0| 64 6f 75 62 6c 65 20 2a | 76 6f 6c 74 5a 65 72 6f |double *|voltZero|
|000032d0| 50 74 72 29 3b 0d 73 68 | 6f 72 74 09 49 6e 69 74 |Ptr);.sh|ort.Init|
|000032e0| 69 61 74 65 56 6f 6c 74 | 61 67 65 53 61 6d 70 6c |iateVolt|ageSampl|
|000032f0| 69 6e 67 28 73 68 6f 72 | 74 20 63 68 61 6e 6e 65 |ing(shor|t channe|
|00003300| 6c 2c 64 6f 75 62 6c 65 | 20 2a 67 61 69 6e 50 74 |l,double| *gainPt|
|00003310| 72 2c 64 6f 75 62 6c 65 | 20 2a 66 72 65 71 75 65 |r,double| *freque|
|00003320| 6e 63 79 50 74 72 0d 09 | 09 09 2c 64 6f 75 62 6c |ncyPtr..|..,doubl|
|00003330| 65 20 2a 76 6f 6c 74 44 | 65 6c 74 61 50 74 72 2c |e *voltD|eltaPtr,|
|00003340| 64 6f 75 62 6c 65 20 2a | 76 6f 6c 74 5a 65 72 6f |double *|voltZero|
|00003350| 50 74 72 29 3b 0d 73 68 | 6f 72 74 09 52 65 74 72 |Ptr);.sh|ort.Retr|
|00003360| 69 65 76 65 56 6f 6c 74 | 61 67 65 73 28 6c 6f 6e |ieveVolt|ages(lon|
|00003370| 67 20 2a 6e 50 74 72 2c | 75 6e 73 69 67 6e 65 64 |g *nPtr,|unsigned|
|00003380| 20 73 68 6f 72 74 20 72 | 65 61 64 69 6e 67 73 5b | short r|eadings[|
|00003390| 5d 29 3b 0d 69 6e 74 09 | 09 46 6f 72 65 52 75 6e |]);.int.|.ForeRun|
|000033a0| 6e 65 72 53 6c 6f 74 28 | 76 6f 69 64 29 3b 0d 65 |nerSlot(|void);.e|
|000033b0| 6e 75 6d 7b 76 6f 6c 74 | 61 67 65 42 75 66 66 65 |num{volt|ageBuffe|
|000033c0| 72 4f 76 65 72 66 6c 6f | 77 3d 31 3c 3c 30 2c 76 |rOverflo|w=1<<0,v|
|000033d0| 6f 6c 74 61 67 65 4f 76 | 65 72 66 6c 6f 77 3d 31 |oltageOv|erflow=1|
|000033e0| 3c 3c 31 2c 76 6f 6c 74 | 61 67 65 55 6e 64 65 72 |<<1,volt|ageUnder|
|000033f0| 66 6c 6f 77 3d 31 3c 3c | 32 7d 3b 0d 0d 2f 2a 20 |flow=1<<|2};../* |
|00003400| 48 69 64 65 4d 65 6e 75 | 42 61 72 2e 63 20 2a 2f |HideMenu|Bar.c */|
|00003410| 0d 0d 76 6f 69 64 09 48 | 69 64 65 4d 65 6e 75 42 |..void.H|ideMenuB|
|00003420| 61 72 28 76 6f 69 64 29 | 3b 0d 76 6f 69 64 09 53 |ar(void)|;.void.S|
|00003430| 68 6f 77 4d 65 6e 75 42 | 61 72 28 76 6f 69 64 29 |howMenuB|ar(void)|
|00003440| 3b 0d 76 6f 69 64 20 53 | 71 75 61 72 65 43 6f 72 |;.void S|quareCor|
|00003450| 6e 65 72 73 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |ners(GDH|andle de|
|00003460| 76 69 63 65 29 3b 0d 76 | 6f 69 64 20 52 65 73 74 |vice);.v|oid Rest|
|00003470| 6f 72 65 43 6f 72 6e 65 | 72 73 28 47 44 48 61 6e |oreCorne|rs(GDHan|
|00003480| 64 6c 65 20 64 65 76 69 | 63 65 29 3b 0d 76 6f 69 |dle devi|ce);.voi|
|00003490| 64 20 55 6e 63 6c 69 70 | 53 63 72 65 65 6e 28 47 |d Unclip|Screen(G|
|000034a0| 44 48 61 6e 64 6c 65 20 | 64 65 76 69 63 65 29 3b |DHandle |device);|
|000034b0| 0d 76 6f 69 64 20 52 65 | 73 74 6f 72 65 53 63 72 |.void Re|storeScr|
|000034c0| 65 65 6e 43 6c 69 70 70 | 69 6e 67 28 47 44 48 61 |eenClipp|ing(GDHa|
|000034d0| 6e 64 6c 65 20 64 65 76 | 69 63 65 29 3b 0d 0d 2f |ndle dev|ice);../|
|000034e0| 2a 20 49 64 65 6e 74 69 | 66 79 2e 63 20 2a 2f 0d |* Identi|fy.c */.|
|000034f0| 0d 63 68 61 72 20 2a 49 | 64 65 6e 74 69 66 79 43 |.char *I|dentifyC|
|00003500| 6f 6d 70 69 6c 65 72 28 | 76 6f 69 64 29 3b 0d 63 |ompiler(|void);.c|
|00003510| 68 61 72 20 2a 49 64 65 | 6e 74 69 66 79 4d 61 63 |har *Ide|ntifyMac|
|00003520| 68 69 6e 65 28 76 6f 69 | 64 29 3b 0d 63 68 61 72 |hine(voi|d);.char|
|00003530| 20 2a 49 64 65 6e 74 69 | 66 79 4d 6f 64 65 6c 28 | *Identi|fyModel(|
|00003540| 76 6f 69 64 29 3b 0d 63 | 68 61 72 20 2a 49 64 65 |void);.c|har *Ide|
|00003550| 6e 74 69 66 79 56 69 64 | 65 6f 28 47 44 48 61 6e |ntifyVid|eo(GDHan|
|00003560| 64 6c 65 20 64 65 76 69 | 63 65 29 3b 0d 0d 2f 2a |dle devi|ce);../*|
|00003570| 20 49 73 4e 61 6e 2e 63 | 20 2a 2f 0d 0d 69 6e 74 | IsNan.c| */..int|
|00003580| 20 49 73 4e 61 6e 28 64 | 6f 75 62 6c 65 20 78 29 | IsNan(d|ouble x)|
|00003590| 3b 0d 69 6e 74 20 49 73 | 49 6e 66 28 64 6f 75 62 |;.int Is|Inf(doub|
|000035a0| 6c 65 20 78 29 3b 0d 23 | 69 66 6e 64 65 66 20 49 |le x);.#|ifndef I|
|000035b0| 73 46 69 6e 69 74 65 0d | 09 23 64 65 66 69 6e 65 |sFinite.|.#define|
|000035c0| 20 49 73 46 69 6e 69 74 | 65 28 78 29 20 28 28 2a | IsFinit|e(x) ((*|
|000035d0| 28 73 68 6f 72 74 20 2a | 29 26 28 78 29 20 26 20 |(short *|)&(x) & |
|000035e0| 33 32 37 36 37 29 21 3d | 33 32 37 36 37 29 09 2f |32767)!=|32767)./|
|000035f0| 2a 20 6e 65 69 74 68 65 | 72 20 4e 41 4e 20 6e 6f |* neithe|r NAN no|
|00003600| 72 20 b1 49 4e 46 20 2a | 2f 0d 23 65 6e 64 69 66 |r .INF *|/.#endif|
|00003610| 0d 0d 2f 2a 20 6b 62 68 | 69 74 2e 63 20 2a 2f 0d |../* kbh|it.c */.|
|00003620| 0d 69 6e 74 09 6b 62 68 | 69 74 28 76 6f 69 64 29 |.int.kbh|it(void)|
|00003630| 3b 0d 69 6e 74 09 67 65 | 74 63 68 61 72 55 6e 62 |;.int.ge|tcharUnb|
|00003640| 75 66 66 65 72 65 64 28 | 76 6f 69 64 29 3b 0d 42 |uffered(|void);.B|
|00003650| 6f 6f 6c 65 61 6e 20 59 | 65 73 4f 72 4e 6f 28 42 |oolean Y|esOrNo(B|
|00003660| 6f 6f 6c 65 61 6e 20 64 | 65 66 61 75 6c 74 41 6e |oolean d|efaultAn|
|00003670| 73 77 65 72 29 3b 0d 0d | 2f 2a 20 4c 6f 67 32 4c |swer);..|/* Log2L|
|00003680| 2e 63 20 2a 2f 0d 0d 6c | 6f 6e 67 20 4c 6f 67 32 |.c */..l|ong Log2|
|00003690| 4c 28 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 20 |L(unsign|ed long |
|000036a0| 6a 29 3b 0d 0d 2f 2a 20 | 4d 61 6b 65 4e 6f 69 73 |j);../* |MakeNois|
|000036b0| 65 2e 63 20 2a 2f 0d 0d | 42 6f 6f 6c 65 61 6e 20 |e.c */..|Boolean |
|000036c0| 4d 61 6b 65 4e 6f 69 73 | 65 31 28 64 6f 75 62 6c |MakeNois|e1(doubl|
|000036d0| 65 20 64 78 2c 64 6f 75 | 62 6c 65 20 64 79 2c 42 |e dx,dou|ble dy,B|
|000036e0| 6f 6f 6c 65 61 6e 20 72 | 61 6e 64 6f 6d 50 68 61 |oolean r|andomPha|
|000036f0| 73 65 2c 50 69 78 4d 61 | 70 20 2a 66 72 61 6d 65 |se,PixMa|p *frame|
|00003700| 29 3b 0d 76 6f 69 64 09 | 4d 61 6b 65 4e 6f 69 73 |);.void.|MakeNois|
|00003710| 65 28 64 6f 75 62 6c 65 | 20 64 78 2c 64 6f 75 62 |e(double| dx,doub|
|00003720| 6c 65 20 64 79 2c 50 69 | 78 4d 61 70 20 66 72 61 |le dy,Pi|xMap fra|
|00003730| 6d 65 5b 5d 2c 73 68 6f | 72 74 20 2a 6d 61 78 46 |me[],sho|rt *maxF|
|00003740| 72 61 6d 65 73 50 74 72 | 29 3b 0d 0d 2f 2a 20 4d |ramesPtr|);../* M|
|00003750| 61 78 69 6d 69 7a 65 43 | 6f 6e 73 6f 6c 65 48 65 |aximizeC|onsoleHe|
|00003760| 69 67 68 74 2e 63 20 2a | 2f 0d 0d 76 6f 69 64 20 |ight.c *|/..void |
|00003770| 4d 61 78 69 6d 69 7a 65 | 43 6f 6e 73 6f 6c 65 48 |Maximize|ConsoleH|
|00003780| 65 69 67 68 74 28 76 6f | 69 64 29 3b 0d 0d 2f 2a |eight(vo|id);../*|
|00003790| 20 4d 65 61 6e 2e 63 20 | 2a 2f 0d 0d 64 6f 75 62 | Mean.c |*/..doub|
|000037a0| 6c 65 09 4d 65 61 6e 28 | 64 6f 75 62 6c 65 20 78 |le.Mean(|double x|
|000037b0| 5b 5d 2c 6c 6f 6e 67 20 | 6e 2c 64 6f 75 62 6c 65 |[],long |n,double|
|000037c0| 20 2a 73 64 50 74 72 29 | 3b 0d 0d 2f 2a 20 4d 79 | *sdPtr)|;../* My|
|000037d0| 46 67 65 74 73 2e 63 20 | 2a 2f 0d 0d 63 68 61 72 |Fgets.c |*/..char|
|000037e0| 09 2a 4d 79 46 67 65 74 | 73 28 63 68 61 72 20 2a |.*MyFget|s(char *|
|000037f0| 73 2c 20 69 6e 74 20 6c | 65 6e 67 74 68 2c 20 46 |s, int l|ength, F|
|00003800| 49 4c 45 20 2a 73 74 72 | 65 61 6d 29 3b 0d 0d 2f |ILE *str|eam);../|
|00003810| 2a 20 4e 6f 72 6d 61 6c | 2e 63 20 2a 2f 0d 0d 64 |* Normal|.c */..d|
|00003820| 6f 75 62 6c 65 09 4e 6f | 72 6d 61 6c 50 64 66 28 |ouble.No|rmalPdf(|
|00003830| 64 6f 75 62 6c 65 20 78 | 29 3b 0d 64 6f 75 62 6c |double x|);.doubl|
|00003840| 65 09 4e 6f 72 6d 61 6c | 28 64 6f 75 62 6c 65 20 |e.Normal|(double |
|00003850| 78 29 3b 0d 64 6f 75 62 | 6c 65 09 49 6e 76 65 72 |x);.doub|le.Inver|
|00003860| 73 65 4e 6f 72 6d 61 6c | 28 64 6f 75 62 6c 65 20 |seNormal|(double |
|00003870| 70 29 3b 0d 64 6f 75 62 | 6c 65 09 4e 6f 72 6d 61 |p);.doub|le.Norma|
|00003880| 6c 53 61 6d 70 6c 65 28 | 76 6f 69 64 29 3b 0d 64 |lSample(|void);.d|
|00003890| 6f 75 62 6c 65 20 4e 6f | 72 6d 61 6c 32 44 50 64 |ouble No|rmal2DPd|
|000038a0| 66 28 64 6f 75 62 6c 65 | 20 72 29 3b 0d 64 6f 75 |f(double| r);.dou|
|000038b0| 62 6c 65 20 4e 6f 72 6d | 61 6c 32 44 28 64 6f 75 |ble Norm|al2D(dou|
|000038c0| 62 6c 65 20 72 29 3b 0d | 64 6f 75 62 6c 65 20 49 |ble r);.|double I|
|000038d0| 6e 76 65 72 73 65 4e 6f | 72 6d 61 6c 32 44 28 64 |nverseNo|rmal2D(d|
|000038e0| 6f 75 62 6c 65 20 70 29 | 3b 0d 64 6f 75 62 6c 65 |ouble p)|;.double|
|000038f0| 20 4e 6f 72 6d 61 6c 32 | 44 53 61 6d 70 6c 65 28 | Normal2|DSample(|
|00003900| 76 6f 69 64 29 3b 0d 64 | 6f 75 62 6c 65 20 49 6e |void);.d|ouble In|
|00003910| 76 65 72 73 65 4e 6f 72 | 6d 61 6c 32 44 50 64 66 |verseNor|mal2DPdf|
|00003920| 28 64 6f 75 62 6c 65 20 | 70 29 3b 0d 0d 2f 2a 20 |(double |p);../* |
|00003930| 6e 72 61 6e 64 2e 63 20 | 2a 2f 0d 0d 69 6e 74 20 |nrand.c |*/..int |
|00003940| 6e 72 61 6e 64 28 73 68 | 6f 72 74 20 6e 29 3b 0d |nrand(sh|ort n);.|
|00003950| 75 6e 73 69 67 6e 65 64 | 20 73 68 6f 72 74 20 6e |unsigned| short n|
|00003960| 72 61 6e 64 55 28 75 6e | 73 69 67 6e 65 64 20 73 |randU(un|signed s|
|00003970| 68 6f 72 74 20 6e 29 3b | 0d 75 6e 73 69 67 6e 65 |hort n);|.unsigne|
|00003980| 64 20 6c 6f 6e 67 20 6e | 72 61 6e 64 55 4c 28 75 |d long n|randUL(u|
|00003990| 6e 73 69 67 6e 65 64 20 | 6c 6f 6e 67 20 6e 29 3b |nsigned |long n);|
|000039a0| 0d 0d 2f 2a 09 4f 70 65 | 6e 44 61 74 61 46 69 6c |../*.Ope|nDataFil|
|000039b0| 65 73 2e 63 20 2a 2f 0d | 0d 75 6e 73 69 67 6e 65 |es.c */.|.unsigne|
|000039c0| 64 20 6c 6f 6e 67 09 4f | 70 65 6e 44 61 74 61 46 |d long.O|penDataF|
|000039d0| 69 6c 65 73 28 46 49 4c | 45 20 2a 2a 69 6e 50 74 |iles(FIL|E **inPt|
|000039e0| 72 2c 46 49 4c 45 20 2a | 2a 6f 75 74 50 74 72 0d |r,FILE *|*outPtr.|
|000039f0| 09 09 09 09 09 2c 63 68 | 61 72 20 2a 69 6e 4e 61 |.....,ch|ar *inNa|
|00003a00| 6d 65 2c 63 68 61 72 20 | 2a 6f 75 74 4e 61 6d 65 |me,char |*outName|
|00003a10| 29 3b 0d 0d 2f 2a 09 50 | 69 78 4d 61 70 54 6f 50 |);../*.P|ixMapToP|
|00003a20| 6f 73 74 53 63 72 69 70 | 74 20 2a 2f 0d 0d 76 6f |ostScrip|t */..vo|
|00003a30| 69 64 09 50 69 78 4d 61 | 70 54 6f 50 6f 73 74 53 |id.PixMa|pToPostS|
|00003a40| 63 72 69 70 74 28 63 68 | 61 72 20 2a 66 69 6c 65 |cript(ch|ar *file|
|00003a50| 6e 61 6d 65 2c 50 69 78 | 4d 61 70 20 2a 70 6d 2c |name,Pix|Map *pm,|
|00003a60| 52 65 63 74 20 2a 72 65 | 63 74 50 74 72 0d 09 09 |Rect *re|ctPtr...|
|00003a70| 09 2c 52 65 63 74 20 2a | 70 61 67 65 52 65 63 74 |.,Rect *|pageRect|
|00003a80| 50 74 72 2c 64 6f 75 62 | 6c 65 20 63 65 6c 6c 73 |Ptr,doub|le cells|
|00003a90| 50 65 72 49 6e 63 68 2c | 69 6e 74 20 67 72 61 79 |PerInch,|int gray|
|00003aa0| 4c 65 76 65 6c 73 29 3b | 0d 76 6f 69 64 09 41 70 |Levels);|.void.Ap|
|00003ab0| 70 65 6e 64 54 6f 46 69 | 6c 65 28 63 68 61 72 20 |pendToFi|le(char |
|00003ac0| 2a 66 69 6c 65 6e 61 6d | 65 2c 63 68 61 72 20 2a |*filenam|e,char *|
|00003ad0| 73 74 72 69 6e 67 29 3b | 0d 0d 2f 2a 20 50 6c 6f |string);|../* Plo|
|00003ae0| 74 58 59 2e 63 20 2a 2f | 0d 0d 74 79 70 65 64 65 |tXY.c */|..typede|
|00003af0| 66 20 73 74 72 75 63 74 | 7b 0d 09 42 6f 6f 6c 65 |f struct|{..Boole|
|00003b00| 61 6e 20 63 6f 6e 74 69 | 6e 75 69 6e 67 3b 09 2f |an conti|nuing;./|
|00003b10| 2a 20 7a 65 72 6f 20 74 | 6f 20 73 74 61 72 74 20 |* zero t|o start |
|00003b20| 61 20 6e 65 77 20 63 75 | 72 76 65 20 2a 2f 0d 09 |a new cu|rve */..|
|00003b30| 6c 6f 6e 67 20 63 6f 6c | 6f 72 3b 09 09 09 2f 2a |long col|or;.../*|
|00003b40| 20 65 2e 67 2e 20 62 6c | 61 63 6b 43 6f 6c 6f 72 | e.g. bl|ackColor|
|00003b50| 2c 20 62 6c 75 65 43 6f | 6c 6f 72 20 2a 2f 0d 09 |, blueCo|lor */..|
|00003b60| 73 68 6f 72 74 20 6c 69 | 6e 65 57 69 64 74 68 3b |short li|neWidth;|
|00003b70| 09 2f 2a 20 69 6e 20 70 | 69 78 65 6c 73 2c 20 7a |./* in p|ixels, z|
|00003b80| 65 72 6f 20 66 6f 72 20 | 6e 6f 6e 65 20 2a 2f 0d |ero for |none */.|
|00003b90| 09 73 68 6f 72 74 20 73 | 79 6d 62 6f 6c 57 69 64 |.short s|ymbolWid|
|00003ba0| 74 68 3b 09 2f 2a 20 69 | 6e 20 70 69 78 65 6c 73 |th;./* i|n pixels|
|00003bb0| 2c 20 7a 65 72 6f 20 66 | 6f 72 20 6e 6f 6e 65 20 |, zero f|or none |
|00003bc0| 2a 2f 0d 09 73 68 6f 72 | 74 20 64 61 73 68 4f 66 |*/..shor|t dashOf|
|00003bd0| 66 73 65 74 3b 09 2f 2a | 20 69 6e 20 70 69 78 65 |fset;./*| in pixe|
|00003be0| 6c 73 20 2a 2f 0d 09 73 | 68 6f 72 74 20 64 61 73 |ls */..s|hort das|
|00003bf0| 68 5b 35 5d 3b 09 09 2f | 2a 20 69 6e 20 70 69 78 |h[5];../|* in pix|
|00003c00| 65 6c 73 2e 20 54 68 65 | 20 61 72 72 61 79 20 69 |els. The| array i|
|00003c10| 73 20 74 65 72 6d 69 6e | 61 74 65 64 20 62 79 20 |s termin|ated by |
|00003c20| 61 20 7a 65 72 6f 20 65 | 6c 65 6d 65 6e 74 20 2a |a zero e|lement *|
|00003c30| 2f 0d 09 73 68 6f 72 74 | 20 68 2c 76 3b 09 09 09 |/..short| h,v;...|
|00003c40| 2f 2a 20 72 65 73 65 72 | 76 65 64 20 66 6f 72 20 |/* reser|ved for |
|00003c50| 69 6e 74 65 72 6e 61 6c | 20 75 73 65 20 2a 2f 0d |internal| use */.|
|00003c60| 09 46 69 78 65 64 20 70 | 61 74 68 4c 65 6e 67 74 |.Fixed p|athLengt|
|00003c70| 68 46 3b 09 2f 2a 20 72 | 65 73 65 72 76 65 64 20 |hF;./* r|eserved |
|00003c80| 66 6f 72 20 69 6e 74 65 | 72 6e 61 6c 20 75 73 65 |for inte|rnal use|
|00003c90| 20 2a 2f 0d 7d 20 50 6c | 6f 74 58 59 53 74 79 6c | */.} Pl|otXYStyl|
|00003ca0| 65 3b 0d 76 6f 69 64 20 | 50 6c 6f 74 58 59 28 57 |e;.void |PlotXY(W|
|00003cb0| 69 6e 64 6f 77 50 74 72 | 20 77 69 6e 64 6f 77 2c |indowPtr| window,|
|00003cc0| 64 6f 75 62 6c 65 20 78 | 2c 64 6f 75 62 6c 65 20 |double x|,double |
|00003cd0| 79 2c 50 6c 6f 74 58 59 | 53 74 79 6c 65 20 2a 73 |y,PlotXY|Style *s|
|00003ce0| 74 79 6c 65 29 3b 0d 0d | 2f 2a 20 50 72 69 6e 74 |tyle);..|/* Print|
|00003cf0| 66 45 78 69 74 2e 63 20 | 2a 2f 0d 0d 69 6e 74 20 |fExit.c |*/..int |
|00003d00| 50 72 69 6e 74 66 45 78 | 69 74 28 63 68 61 72 20 |PrintfEx|it(char |
|00003d10| 2a 66 6f 72 6d 61 74 2c | 2e 2e 2e 29 3b 0d 76 6f |*format,|...);.vo|
|00003d20| 69 64 20 52 65 71 75 69 | 72 65 28 6c 6f 6e 67 20 |id Requi|re(long |
|00003d30| 71 75 69 63 6b 44 72 61 | 77 56 65 72 73 69 6f 6e |quickDra|wVersion|
|00003d40| 29 3b 0d 0d 2f 2a 20 51 | 44 33 32 45 78 69 73 74 |);../* Q|D32Exist|
|00003d50| 73 2e 63 20 2a 2f 0d 0d | 42 6f 6f 6c 65 61 6e 20 |s.c */..|Boolean |
|00003d60| 09 09 51 44 38 45 78 69 | 73 74 73 28 76 6f 69 64 |..QD8Exi|sts(void|
|00003d70| 29 3b 0d 42 6f 6f 6c 65 | 61 6e 09 09 09 51 44 33 |);.Boole|an...QD3|
|00003d80| 32 45 78 69 73 74 73 28 | 76 6f 69 64 29 3b 0d 42 |2Exists(|void);.B|
|00003d90| 6f 6f 6c 65 61 6e 09 09 | 09 4e 65 77 50 61 6c 65 |oolean..|.NewPale|
|00003da0| 74 74 65 4d 61 6e 61 67 | 65 72 28 76 6f 69 64 29 |tteManag|er(void)|
|00003db0| 3b 0d 0d 2f 2a 20 72 61 | 6e 64 55 2e 63 20 2a 2f |;../* ra|ndU.c */|
|00003dc0| 0d 0d 75 6e 73 69 67 6e | 65 64 20 73 68 6f 72 74 |..unsign|ed short|
|00003dd0| 09 72 61 6e 64 55 28 76 | 6f 69 64 29 3b 0d 75 6e |.randU(v|oid);.un|
|00003de0| 73 69 67 6e 65 64 20 6c | 6f 6e 67 09 72 61 6e 64 |signed l|ong.rand|
|00003df0| 55 4c 28 76 6f 69 64 29 | 3b 0d 76 6f 69 64 09 09 |UL(void)|;.void..|
|00003e00| 09 73 72 61 6e 64 55 28 | 75 6e 73 69 67 6e 65 64 |.srandU(|unsigned|
|00003e10| 20 6e 29 3b 0d 76 6f 69 | 64 09 09 09 52 61 6e 64 | n);.voi|d...Rand|
|00003e20| 46 69 6c 6c 28 76 6f 69 | 64 20 2a 61 64 64 72 65 |Fill(voi|d *addre|
|00003e30| 73 73 2c 6c 6f 6e 67 20 | 62 79 74 65 73 29 3b 0d |ss,long |bytes);.|
|00003e40| 0d 0d 2f 2a 20 52 65 61 | 64 41 73 73 69 67 6e 6d |../* Rea|dAssignm|
|00003e50| 65 6e 74 73 2e 63 20 2a | 2f 0d 0d 65 6e 75 6d 7b |ents.c *|/..enum{|
|00003e60| 65 63 68 6f 41 73 73 69 | 67 6e 6d 65 6e 74 73 3d |echoAssi|gnments=|
|00003e70| 31 2c 65 63 68 6f 43 6f | 6d 6d 65 6e 74 73 3d 32 |1,echoCo|mments=2|
|00003e80| 2c 65 63 68 6f 46 69 6c | 65 3d 34 7d 3b 0d 65 6e |,echoFil|e=4};.en|
|00003e90| 75 6d 7b 63 68 61 72 54 | 79 70 65 3d 31 2c 73 68 |um{charT|ype=1,sh|
|00003ea0| 6f 72 74 54 79 70 65 2c | 6c 6f 6e 67 54 79 70 65 |ortType,|longType|
|00003eb0| 2c 75 6e 73 69 67 6e 65 | 64 43 68 61 72 54 79 70 |,unsigne|dCharTyp|
|00003ec0| 65 2c 75 6e 73 69 67 6e | 65 64 53 68 6f 72 74 54 |e,unsign|edShortT|
|00003ed0| 79 70 65 2c 75 6e 73 69 | 67 6e 65 64 4c 6f 6e 67 |ype,unsi|gnedLong|
|00003ee0| 54 79 70 65 0d 09 2c 64 | 6f 75 62 6c 65 54 79 70 |Type..,d|oubleTyp|
|00003ef0| 65 2c 73 74 72 69 6e 67 | 54 79 70 65 7d 3b 0d 74 |e,string|Type};.t|
|00003f00| 79 70 65 64 65 66 20 73 | 74 72 75 63 74 20 7b 0d |ypedef s|truct {.|
|00003f10| 09 73 68 6f 72 74 20 74 | 79 70 65 3b 0d 09 63 68 |.short t|ype;..ch|
|00003f20| 61 72 20 2a 6e 61 6d 65 | 3b 0d 09 76 6f 69 64 20 |ar *name|;..void |
|00003f30| 2a 70 74 72 3b 0d 7d 20 | 56 61 72 69 61 62 6c 65 |*ptr;.} |Variable|
|00003f40| 3b 0d 76 6f 69 64 20 50 | 72 69 6e 74 41 73 73 69 |;.void P|rintAssi|
|00003f50| 67 6e 6d 65 6e 74 28 46 | 49 4c 45 20 2a 66 69 6c |gnment(F|ILE *fil|
|00003f60| 65 2c 56 61 72 69 61 62 | 6c 65 20 2a 76 29 3b 0d |e,Variab|le *v);.|
|00003f70| 42 6f 6f 6c 65 61 6e 20 | 41 73 73 69 67 6e 6d 65 |Boolean |Assignme|
|00003f80| 6e 74 4c 69 6e 65 57 61 | 73 42 6c 61 6e 6b 28 76 |ntLineWa|sBlank(v|
|00003f90| 6f 69 64 29 3b 0d 69 6e | 74 20 52 65 61 64 41 73 |oid);.in|t ReadAs|
|00003fa0| 73 69 67 6e 6d 65 6e 74 | 4c 69 6e 65 28 46 49 4c |signment|Line(FIL|
|00003fb0| 45 20 2a 66 69 6c 65 2c | 56 61 72 69 61 62 6c 65 |E *file,|Variable|
|00003fc0| 20 76 61 72 69 61 62 6c | 65 5b 5d 2c 69 6e 74 20 | variabl|e[],int |
|00003fd0| 65 63 68 6f 29 3b 0d 69 | 6e 74 20 52 65 61 64 41 |echo);.i|nt ReadA|
|00003fe0| 73 73 69 67 6e 6d 65 6e | 74 42 6c 6f 63 6b 28 46 |ssignmen|tBlock(F|
|00003ff0| 49 4c 45 20 2a 66 69 6c | 65 2c 56 61 72 69 61 62 |ILE *fil|e,Variab|
|00004000| 6c 65 20 76 61 72 69 61 | 62 6c 65 5b 5d 2c 69 6e |le varia|ble[],in|
|00004010| 74 20 65 63 68 6f 29 3b | 0d 69 6e 74 20 52 65 61 |t echo);|.int Rea|
|00004020| 64 41 73 73 69 67 6e 6d | 65 6e 74 46 69 6c 65 28 |dAssignm|entFile(|
|00004030| 63 68 61 72 20 2a 66 69 | 6c 65 6e 61 6d 65 2c 56 |char *fi|lename,V|
|00004040| 61 72 69 61 62 6c 65 20 | 76 61 72 69 61 62 6c 65 |ariable |variable|
|00004050| 5b 5d 2c 69 6e 74 20 65 | 63 68 6f 29 3b 0d 69 6e |[],int e|cho);.in|
|00004060| 74 20 49 6e 69 74 69 61 | 6c 69 7a 65 56 61 72 69 |t Initia|lizeVari|
|00004070| 61 62 6c 65 73 28 56 61 | 72 69 61 62 6c 65 20 76 |ables(Va|riable v|
|00004080| 61 72 69 61 62 6c 65 5b | 5d 29 3b 0d 76 6f 69 64 |ariable[|]);.void|
|00004090| 20 49 6e 69 74 69 61 6c | 69 7a 65 41 56 61 72 69 | Initial|izeAVari|
|000040a0| 61 62 6c 65 28 56 61 72 | 69 61 62 6c 65 20 2a 76 |able(Var|iable *v|
|000040b0| 61 72 69 61 62 6c 65 29 | 3b 0d 56 61 72 69 61 62 |ariable)|;.Variab|
|000040c0| 6c 65 20 53 65 74 56 61 | 72 69 61 62 6c 65 28 69 |le SetVa|riable(i|
|000040d0| 6e 74 20 74 79 70 65 2c | 76 6f 69 64 20 2a 70 74 |nt type,|void *pt|
|000040e0| 72 2c 63 68 61 72 20 2a | 6e 61 6d 65 29 3b 0d 0d |r,char *|name);..|
|000040f0| 2f 2a 20 52 65 61 64 4d | 61 74 4c 61 62 46 69 6c |/* ReadM|atLabFil|
|00004100| 65 2e 63 20 2a 2f 0d 0d | 69 6e 74 20 4c 6f 61 64 |e.c */..|int Load|
|00004110| 4d 61 74 44 6f 75 62 6c | 65 73 28 46 49 4c 45 20 |MatDoubl|es(FILE |
|00004120| 2a 66 2c 63 68 61 72 20 | 2a 6e 61 6d 65 2c 6c 6f |*f,char |*name,lo|
|00004130| 6e 67 20 2a 72 6f 77 73 | 2c 6c 6f 6e 67 20 2a 63 |ng *rows|,long *c|
|00004140| 6f 6c 73 0d 09 2c 64 6f | 75 62 6c 65 20 2a 2a 72 |ols..,do|uble **r|
|00004150| 65 61 6c 2c 64 6f 75 62 | 6c 65 20 2a 2a 69 6d 61 |eal,doub|le **ima|
|00004160| 67 29 3b 0d 69 6e 74 20 | 4c 6f 61 64 4d 61 74 53 |g);.int |LoadMatS|
|00004170| 68 6f 72 74 73 28 46 49 | 4c 45 20 2a 66 2c 63 68 |horts(FI|LE *f,ch|
|00004180| 61 72 20 2a 6e 61 6d 65 | 2c 6c 6f 6e 67 20 2a 72 |ar *name|,long *r|
|00004190| 6f 77 73 2c 6c 6f 6e 67 | 20 2a 63 6f 6c 73 0d 09 |ows,long| *cols..|
|000041a0| 2c 73 68 6f 72 74 20 2a | 2a 72 65 61 6c 2c 73 68 |,short *|*real,sh|
|000041b0| 6f 72 74 20 2a 2a 69 6d | 61 67 29 3b 0d 69 6e 74 |ort **im|ag);.int|
|000041c0| 20 53 61 76 65 4d 61 74 | 44 6f 75 62 6c 65 73 28 | SaveMat|Doubles(|
|000041d0| 46 49 4c 45 20 2a 66 2c | 63 68 61 72 20 2a 6e 61 |FILE *f,|char *na|
|000041e0| 6d 65 2c 6c 6f 6e 67 20 | 72 6f 77 73 2c 6c 6f 6e |me,long |rows,lon|
|000041f0| 67 20 63 6f 6c 73 2c 64 | 6f 75 62 6c 65 20 2a 72 |g cols,d|ouble *r|
|00004200| 65 61 6c 2c 64 6f 75 62 | 6c 65 20 2a 69 6d 61 67 |eal,doub|le *imag|
|00004210| 29 3b 0d 69 6e 74 20 53 | 61 76 65 4d 61 74 53 68 |);.int S|aveMatSh|
|00004220| 6f 72 74 73 28 46 49 4c | 45 20 2a 66 2c 63 68 61 |orts(FIL|E *f,cha|
|00004230| 72 20 2a 6e 61 6d 65 2c | 6c 6f 6e 67 20 72 6f 77 |r *name,|long row|
|00004240| 73 2c 6c 6f 6e 67 20 63 | 6f 6c 73 2c 73 68 6f 72 |s,long c|ols,shor|
|00004250| 74 20 2a 72 65 61 6c 2c | 73 68 6f 72 74 20 2a 69 |t *real,|short *i|
|00004260| 6d 61 67 29 3b 0d 0d 2f | 2a 20 52 65 63 74 54 6f |mag);../|* RectTo|
|00004270| 41 64 64 72 65 73 73 2e | 63 20 2a 2f 0d 0d 75 6e |Address.|c */..un|
|00004280| 73 69 67 6e 65 64 20 63 | 68 61 72 09 2a 52 65 63 |signed c|har.*Rec|
|00004290| 74 54 6f 41 64 64 72 65 | 73 73 28 50 69 78 4d 61 |tToAddre|ss(PixMa|
|000042a0| 70 20 2a 6d 79 50 69 78 | 4d 61 70 50 74 72 2c 52 |p *myPix|MapPtr,R|
|000042b0| 65 63 74 20 2a 6d 79 52 | 65 63 74 50 74 72 0d 09 |ect *myR|ectPtr..|
|000042c0| 09 09 09 09 2c 73 68 6f | 72 74 20 2a 6d 79 52 6f |....,sho|rt *myRo|
|000042d0| 77 42 79 74 65 73 50 74 | 72 2c 73 68 6f 72 74 20 |wBytesPt|r,short |
|000042e0| 2a 6d 79 50 69 78 65 6c | 53 69 7a 65 50 74 72 2c |*myPixel|SizePtr,|
|000042f0| 73 68 6f 72 74 20 2a 62 | 69 74 73 4f 66 66 73 65 |short *b|itsOffse|
|00004300| 74 50 74 72 29 3b 0d 0d | 2f 2a 20 52 65 73 74 6f |tPtr);..|/* Resto|
|00004310| 72 65 43 6c 75 74 73 2e | 63 20 2a 2f 0d 0d 76 6f |reCluts.|c */..vo|
|00004320| 69 64 20 52 65 73 74 6f | 72 65 43 6c 75 74 73 28 |id Resto|reCluts(|
|00004330| 76 6f 69 64 29 3b 0d 0d | 2f 2a 09 53 65 74 45 6e |void);..|/*.SetEn|
|00004340| 74 72 69 65 73 51 75 69 | 63 6b 6c 79 2e 63 20 2a |triesQui|ckly.c *|
|00004350| 2f 0d 0d 4f 53 45 72 72 | 20 53 65 74 45 6e 74 72 |/..OSErr| SetEntr|
|00004360| 69 65 73 51 75 69 63 6b | 6c 79 28 47 44 48 61 6e |iesQuick|ly(GDHan|
|00004370| 64 6c 65 20 64 65 76 69 | 63 65 2c 73 68 6f 72 74 |dle devi|ce,short|
|00004380| 20 73 74 61 72 74 2c 73 | 68 6f 72 74 20 63 6f 75 | start,s|hort cou|
|00004390| 6e 74 2c 43 6f 6c 6f 72 | 53 70 65 63 20 2a 74 61 |nt,Color|Spec *ta|
|000043a0| 62 6c 65 29 3b 0d 73 68 | 6f 72 74 20 6d 61 63 6c |ble);.sh|ort macl|
|000043b0| 74 73 65 74 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |tset(GDH|andle de|
|000043c0| 76 69 63 65 2c 72 65 67 | 69 73 74 65 72 20 73 68 |vice,reg|ister sh|
|000043d0| 6f 72 74 20 73 74 61 72 | 74 0d 09 2c 73 68 6f 72 |ort star|t..,shor|
|000043e0| 74 20 2a 72 65 64 2c 73 | 68 6f 72 74 20 2a 67 72 |t *red,s|hort *gr|
|000043f0| 65 65 6e 2c 73 68 6f 72 | 74 20 2a 62 6c 75 65 2c |een,shor|t *blue,|
|00004400| 73 68 6f 72 74 20 63 6f | 75 6e 74 31 29 3b 0d 73 |short co|unt1);.s|
|00004410| 68 6f 72 74 20 47 65 74 | 43 61 72 64 54 79 70 65 |hort Get|CardType|
|00004420| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00004430| 29 3b 0d 63 68 61 72 20 | 2a 47 65 74 43 61 72 64 |);.char |*GetCard|
|00004440| 42 61 73 65 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |Base(GDH|andle de|
|00004450| 76 69 63 65 29 3b 0d 4f | 53 45 72 72 20 57 61 69 |vice);.O|SErr Wai|
|00004460| 74 46 6f 72 4e 65 78 74 | 42 6c 61 6e 6b 69 6e 67 |tForNext|Blanking|
|00004470| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00004480| 29 3b 0d 0d 2f 2a 20 53 | 65 74 46 69 6c 65 49 6e |);../* S|etFileIn|
|00004490| 66 6f 2e 63 20 2a 2f 0d | 0d 76 6f 69 64 09 53 65 |fo.c */.|.void.Se|
|000044a0| 74 46 69 6c 65 49 6e 66 | 6f 28 63 68 61 72 20 2a |tFileInf|o(char *|
|000044b0| 66 69 6c 65 4e 61 6d 65 | 2c 4f 53 54 79 70 65 20 |fileName|,OSType |
|000044c0| 66 69 6c 65 54 79 70 65 | 2c 4f 53 54 79 70 65 20 |fileType|,OSType |
|000044d0| 66 69 6c 65 43 72 65 61 | 74 6f 72 29 3b 0d 0d 2f |fileCrea|tor);../|
|000044e0| 2a 20 53 65 74 4d 6f 75 | 73 65 2e 63 20 2a 2f 0d |* SetMou|se.c */.|
|000044f0| 0d 76 6f 69 64 09 53 65 | 74 4d 6f 75 73 65 28 50 |.void.Se|tMouse(P|
|00004500| 6f 69 6e 74 20 6d 6f 75 | 73 65 4c 6f 63 29 3b 0d |oint mou|seLoc);.|
|00004510| 0d 2f 2a 20 53 65 74 4f | 6e 65 50 69 78 65 6c 2e |./* SetO|nePixel.|
|00004520| 63 20 2a 2f 0d 0d 76 6f | 69 64 20 53 65 74 50 69 |c */..vo|id SetPi|
|00004530| 78 6d 61 70 50 69 78 65 | 6c 28 50 69 78 4d 61 70 |xmapPixe|l(PixMap|
|00004540| 20 2a 70 6d 48 61 6e 64 | 6c 65 2c 69 6e 74 20 78 | *pmHand|le,int x|
|00004550| 2c 69 6e 74 20 79 2c 75 | 6e 73 69 67 6e 65 64 20 |,int y,u|nsigned |
|00004560| 6c 6f 6e 67 20 76 61 6c | 75 65 29 3b 0d 75 6e 73 |long val|ue);.uns|
|00004570| 69 67 6e 65 64 20 6c 6f | 6e 67 20 47 65 74 50 69 |igned lo|ng GetPi|
|00004580| 78 6d 61 70 50 69 78 65 | 6c 28 50 69 78 4d 61 70 |xmapPixe|l(PixMap|
|00004590| 20 2a 70 6d 48 61 6e 64 | 6c 65 2c 69 6e 74 20 78 | *pmHand|le,int x|
|000045a0| 2c 69 6e 74 20 79 29 3b | 0d 75 6e 73 69 67 6e 65 |,int y);|.unsigne|
|000045b0| 64 20 63 68 61 72 20 2a | 47 65 74 50 69 78 6d 61 |d char *|GetPixma|
|000045c0| 70 50 69 78 65 6c 41 64 | 64 72 65 73 73 28 50 69 |pPixelAd|dress(Pi|
|000045d0| 78 4d 61 70 20 2a 70 6d | 48 61 6e 64 6c 65 2c 69 |xMap *pm|Handle,i|
|000045e0| 6e 74 20 78 2c 69 6e 74 | 20 79 29 3b 0d 76 6f 69 |nt x,int| y);.voi|
|000045f0| 64 20 53 65 74 44 65 76 | 69 63 65 50 69 78 65 6c |d SetDev|icePixel|
|00004600| 28 47 44 48 61 6e 64 6c | 65 20 64 65 76 69 63 65 |(GDHandl|e device|
|00004610| 2c 69 6e 74 20 78 2c 69 | 6e 74 20 79 2c 75 6e 73 |,int x,i|nt y,uns|
|00004620| 69 67 6e 65 64 20 6c 6f | 6e 67 20 76 61 6c 75 65 |igned lo|ng value|
|00004630| 29 3b 0d 75 6e 73 69 67 | 6e 65 64 20 6c 6f 6e 67 |);.unsig|ned long|
|00004640| 20 47 65 74 44 65 76 69 | 63 65 50 69 78 65 6c 28 | GetDevi|cePixel(|
|00004650| 47 44 48 61 6e 64 6c 65 | 20 64 65 76 69 63 65 2c |GDHandle| device,|
|00004660| 69 6e 74 20 78 2c 69 6e | 74 20 79 29 3b 0d 76 6f |int x,in|t y);.vo|
|00004670| 69 64 20 53 65 74 4f 6e | 65 50 69 78 65 6c 28 69 |id SetOn|ePixel(i|
|00004680| 6e 74 20 78 2c 69 6e 74 | 20 79 2c 75 6e 73 69 67 |nt x,int| y,unsig|
|00004690| 6e 65 64 20 6c 6f 6e 67 | 20 76 61 6c 75 65 29 3b |ned long| value);|
|000046a0| 0d 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 20 47 |.unsigne|d long G|
|000046b0| 65 74 4f 6e 65 50 69 78 | 65 6c 28 69 6e 74 20 78 |etOnePix|el(int x|
|000046c0| 2c 69 6e 74 20 79 29 3b | 0d 23 64 65 66 69 6e 65 |,int y);|.#define|
|000046d0| 20 53 65 74 49 50 69 78 | 65 6c 20 53 65 74 44 65 | SetIPix|el SetDe|
|000046e0| 76 69 63 65 50 69 78 65 | 6c 09 2f 2f 20 53 6f 20 |vicePixe|l.// So |
|000046f0| 74 68 61 74 20 6f 6c 64 | 20 70 72 6f 67 72 61 6d |that old| program|
|00004700| 73 20 77 6f 6e 27 74 20 | 62 72 65 61 6b 2e 0d 23 |s won't |break..#|
|00004710| 64 65 66 69 6e 65 20 47 | 65 74 49 50 69 78 65 6c |define G|etIPixel|
|00004720| 20 47 65 74 44 65 76 69 | 63 65 50 69 78 65 6c 09 | GetDevi|cePixel.|
|00004730| 2f 2f 20 53 6f 20 74 68 | 61 74 20 6f 6c 64 20 70 |// So th|at old p|
|00004740| 72 6f 67 72 61 6d 73 20 | 77 6f 6e 27 74 20 62 72 |rograms |won't br|
|00004750| 65 61 6b 2e 0d 0d 2f 2a | 20 53 65 74 50 69 78 65 |eak.../*| SetPixe|
|00004760| 6c 73 51 75 69 63 6b 6c | 79 2e 63 20 2a 2f 0d 0d |lsQuickl|y.c */..|
|00004770| 69 6e 74 20 53 65 74 50 | 69 78 65 6c 73 51 75 69 |int SetP|ixelsQui|
|00004780| 63 6b 6c 79 28 69 6e 74 | 20 78 2c 69 6e 74 20 79 |ckly(int| x,int y|
|00004790| 2c 75 6e 73 69 67 6e 65 | 64 20 6c 6f 6e 67 20 76 |,unsigne|d long v|
|000047a0| 61 6c 75 65 5b 5d 2c 73 | 68 6f 72 74 20 6e 29 3b |alue[],s|hort n);|
|000047b0| 0d 69 6e 74 20 47 65 74 | 50 69 78 65 6c 73 51 75 |.int Get|PixelsQu|
|000047c0| 69 63 6b 6c 79 28 69 6e | 74 20 78 2c 69 6e 74 20 |ickly(in|t x,int |
|000047d0| 79 2c 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 20 |y,unsign|ed long |
|000047e0| 76 61 6c 75 65 5b 5d 2c | 73 68 6f 72 74 20 6e 29 |value[],|short n)|
|000047f0| 3b 0d 69 6e 74 20 53 65 | 74 57 69 6e 64 6f 77 50 |;.int Se|tWindowP|
|00004800| 69 78 65 6c 73 51 75 69 | 63 6b 6c 79 28 57 69 6e |ixelsQui|ckly(Win|
|00004810| 64 6f 77 50 74 72 20 77 | 69 6e 64 6f 77 2c 69 6e |dowPtr w|indow,in|
|00004820| 74 20 78 2c 69 6e 74 20 | 79 2c 75 6e 73 69 67 6e |t x,int |y,unsign|
|00004830| 65 64 20 6c 6f 6e 67 20 | 76 61 6c 75 65 5b 5d 2c |ed long |value[],|
|00004840| 73 68 6f 72 74 20 6e 29 | 3b 0d 69 6e 74 20 47 65 |short n)|;.int Ge|
|00004850| 74 57 69 6e 64 6f 77 50 | 69 78 65 6c 73 51 75 69 |tWindowP|ixelsQui|
|00004860| 63 6b 6c 79 28 57 69 6e | 64 6f 77 50 74 72 20 77 |ckly(Win|dowPtr w|
|00004870| 69 6e 64 6f 77 2c 69 6e | 74 20 78 2c 69 6e 74 20 |indow,in|t x,int |
|00004880| 79 2c 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 20 |y,unsign|ed long |
|00004890| 76 61 6c 75 65 5b 5d 2c | 73 68 6f 72 74 20 6e 29 |value[],|short n)|
|000048a0| 3b 0d 69 6e 74 20 53 65 | 74 44 65 76 69 63 65 50 |;.int Se|tDeviceP|
|000048b0| 69 78 65 6c 73 51 75 69 | 63 6b 6c 79 28 47 44 48 |ixelsQui|ckly(GDH|
|000048c0| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 2c 69 6e 74 |andle de|vice,int|
|000048d0| 20 78 2c 69 6e 74 20 79 | 2c 75 6e 73 69 67 6e 65 | x,int y|,unsigne|
|000048e0| 64 20 6c 6f 6e 67 20 76 | 61 6c 75 65 5b 5d 2c 73 |d long v|alue[],s|
|000048f0| 68 6f 72 74 20 6e 29 3b | 0d 69 6e 74 20 47 65 74 |hort n);|.int Get|
|00004900| 44 65 76 69 63 65 50 69 | 78 65 6c 73 51 75 69 63 |DevicePi|xelsQuic|
|00004910| 6b 6c 79 28 47 44 48 61 | 6e 64 6c 65 20 64 65 76 |kly(GDHa|ndle dev|
|00004920| 69 63 65 2c 69 6e 74 20 | 78 2c 69 6e 74 20 79 2c |ice,int |x,int y,|
|00004930| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 76 61 |unsigned| long va|
|00004940| 6c 75 65 5b 5d 2c 73 68 | 6f 72 74 20 6e 29 3b 0d |lue[],sh|ort n);.|
|00004950| 69 6e 74 20 53 65 74 50 | 69 78 6d 61 70 50 69 78 |int SetP|ixmapPix|
|00004960| 65 6c 73 51 75 69 63 6b | 6c 79 28 50 69 78 4d 61 |elsQuick|ly(PixMa|
|00004970| 70 50 74 72 20 70 6d 50 | 74 72 2c 69 6e 74 20 78 |pPtr pmP|tr,int x|
|00004980| 2c 69 6e 74 20 79 2c 75 | 6e 73 69 67 6e 65 64 20 |,int y,u|nsigned |
|00004990| 6c 6f 6e 67 20 76 61 6c | 75 65 5b 5d 2c 73 68 6f |long val|ue[],sho|
|000049a0| 72 74 20 6e 29 3b 0d 69 | 6e 74 20 47 65 74 50 69 |rt n);.i|nt GetPi|
|000049b0| 78 6d 61 70 50 69 78 65 | 6c 73 51 75 69 63 6b 6c |xmapPixe|lsQuickl|
|000049c0| 79 28 50 69 78 4d 61 70 | 50 74 72 20 70 6d 50 74 |y(PixMap|Ptr pmPt|
|000049d0| 72 2c 69 6e 74 20 78 2c | 69 6e 74 20 79 2c 75 6e |r,int x,|int y,un|
|000049e0| 73 69 67 6e 65 64 20 6c | 6f 6e 67 20 76 61 6c 75 |signed l|ong valu|
|000049f0| 65 5b 5d 2c 73 68 6f 72 | 74 20 6e 29 3b 0d 0d 2f |e[],shor|t n);../|
|00004a00| 2a 20 53 65 74 50 72 69 | 6f 72 69 74 79 2e 63 20 |* SetPri|ority.c |
|00004a10| 2a 2f 0d 0d 76 6f 69 64 | 20 53 77 61 70 50 72 69 |*/..void| SwapPri|
|00004a20| 6f 72 69 74 79 28 63 68 | 61 72 20 2a 70 72 69 6f |ority(ch|ar *prio|
|00004a30| 72 69 74 79 29 3b 0d 76 | 6f 69 64 20 53 65 74 50 |rity);.v|oid SetP|
|00004a40| 72 69 6f 72 69 74 79 28 | 69 6e 74 20 69 29 3b 0d |riority(|int i);.|
|00004a50| 69 6e 74 20 47 65 74 50 | 72 69 6f 72 69 74 79 28 |int GetP|riority(|
|00004a60| 76 6f 69 64 29 3b 0d 0d | 2f 2a 20 53 68 75 66 66 |void);..|/* Shuff|
|00004a70| 6c 65 2e 63 20 2a 2f 0d | 0d 76 6f 69 64 09 53 68 |le.c */.|.void.Sh|
|00004a80| 75 66 66 6c 65 28 73 68 | 6f 72 74 20 61 72 72 61 |uffle(sh|ort arra|
|00004a90| 79 5b 5d 2c 6c 6f 6e 67 | 20 73 69 7a 65 29 3b 0d |y[],long| size);.|
|00004aa0| 0d 2f 2a 20 53 6e 64 50 | 6c 61 79 31 2e 63 20 2a |./* SndP|lay1.c *|
|00004ab0| 2f 0d 0d 4f 53 45 72 72 | 20 53 6e 64 50 6c 61 79 |/..OSErr| SndPlay|
|00004ac0| 31 28 48 61 6e 64 6c 65 | 20 73 6e 64 29 3b 0d 76 |1(Handle| snd);.v|
|00004ad0| 6f 69 64 20 53 6e 64 53 | 74 6f 70 31 28 76 6f 69 |oid SndS|top1(voi|
|00004ae0| 64 29 3b 0d 73 68 6f 72 | 74 20 53 6e 64 44 6f 6e |d);.shor|t SndDon|
|00004af0| 65 31 28 76 6f 69 64 29 | 3b 0d 0d 2f 2a 20 53 74 |e1(void)|;../* St|
|00004b00| 72 69 6e 67 54 6f 44 61 | 74 65 2e 63 20 2a 2f 0d |ringToDa|te.c */.|
|00004b10| 0d 64 6f 75 62 6c 65 20 | 53 74 72 69 6e 67 54 6f |.double |StringTo|
|00004b20| 44 61 74 65 28 63 68 61 | 72 20 2a 73 74 72 69 6e |Date(cha|r *strin|
|00004b30| 67 2c 44 61 74 65 54 69 | 6d 65 52 65 63 20 2a 64 |g,DateTi|meRec *d|
|00004b40| 61 74 65 29 3b 0d 0d 2f | 2a 20 54 69 6d 65 72 2e |ate);../|* Timer.|
|00004b50| 63 20 2a 2f 0d 0d 73 74 | 72 75 63 74 20 54 69 6d |c */..st|ruct Tim|
|00004b60| 65 72 7b 0d 09 54 4d 54 | 61 73 6b 20 74 69 6d 65 |er{..TMT|ask time|
|00004b70| 3b 0d 09 6c 6f 6e 67 20 | 6f 75 72 41 35 3b 0d 09 |;..long |ourA5;..|
|00004b80| 6c 6f 6e 67 20 69 6e 74 | 65 72 76 61 6c 2c 65 6c |long int|erval,el|
|00004b90| 61 70 73 65 64 2c 65 6c | 61 70 73 65 64 49 6e 74 |apsed,el|apsedInt|
|00004ba0| 65 72 76 61 6c 73 3b 0d | 09 6c 6f 6e 67 20 74 69 |ervals;.|.long ti|
|00004bb0| 6d 65 54 6f 53 74 61 72 | 74 54 69 6d 65 72 3b 09 |meToStar|tTimer;.|
|00004bc0| 09 09 2f 2f 20 6d 69 6e | 69 6d 75 6d 20 74 69 6d |..// min|imum tim|
|00004bd0| 65 20 69 6e 20 b5 73 0d | 09 6c 6f 6e 67 20 73 74 |e in .s.|.long st|
|00004be0| 6f 70 44 65 6c 61 79 3b | 09 09 09 09 09 2f 2f 20 |opDelay;|.....// |
|00004bf0| b5 73 20 66 72 6f 6d 20 | 63 61 6c 6c 20 74 6f 20 |.s from |call to |
|00004c00| 73 74 6f 70 2c 20 72 65 | 20 66 72 6f 6d 20 63 61 |stop, re| from ca|
|00004c10| 6c 6c 20 74 6f 20 73 74 | 61 72 74 0d 09 6c 6f 6e |ll to st|art..lon|
|00004c20| 67 20 74 69 6d 65 4d 61 | 6e 61 67 65 72 56 65 72 |g timeMa|nagerVer|
|00004c30| 73 69 6f 6e 3b 0d 09 73 | 74 72 75 63 74 20 54 69 |sion;..s|truct Ti|
|00004c40| 6d 65 72 20 2a 6e 65 78 | 74 2c 2a 70 72 65 76 69 |mer *nex|t,*previ|
|00004c50| 6f 75 73 3b 09 2f 2f 20 | 64 6f 75 62 6c 79 20 6c |ous;.// |doubly l|
|00004c60| 69 6e 6b 65 64 20 6c 69 | 73 74 20 6f 66 20 54 69 |inked li|st of Ti|
|00004c70| 6d 65 72 73 0d 7d 3b 0d | 74 79 70 65 64 65 66 20 |mers.};.|typedef |
|00004c80| 73 74 72 75 63 74 20 54 | 69 6d 65 72 20 54 69 6d |struct T|imer Tim|
|00004c90| 65 72 3b 0d 0d 54 69 6d | 65 72 20 2a 4e 65 77 54 |er;..Tim|er *NewT|
|00004ca0| 69 6d 65 72 28 76 6f 69 | 64 29 3b 0d 76 6f 69 64 |imer(voi|d);.void|
|00004cb0| 20 44 69 73 70 6f 73 65 | 54 69 6d 65 72 28 54 69 | Dispose|Timer(Ti|
|00004cc0| 6d 65 72 20 2a 74 29 3b | 0d 76 6f 69 64 20 53 74 |mer *t);|.void St|
|00004cd0| 61 72 74 54 69 6d 65 72 | 28 54 69 6d 65 72 20 2a |artTimer|(Timer *|
|00004ce0| 74 29 3b 0d 6c 6f 6e 67 | 20 53 74 6f 70 54 69 6d |t);.long| StopTim|
|00004cf0| 65 72 28 54 69 6d 65 72 | 20 2a 74 29 3b 09 09 09 |er(Timer| *t);...|
|00004d00| 09 09 2f 2f 20 b5 73 0d | 64 6f 75 62 6c 65 20 53 |..// .s.|double S|
|00004d10| 74 6f 70 54 69 6d 65 72 | 53 65 63 73 28 54 69 6d |topTimer|Secs(Tim|
|00004d20| 65 72 20 2a 74 29 3b 09 | 09 09 09 2f 2f 20 73 0d |er *t);.|...// s.|
|00004d30| 0d 2f 2a 20 54 69 74 6c | 65 42 61 72 48 65 69 67 |./* Titl|eBarHeig|
|00004d40| 68 74 2e 63 20 2a 2f 0d | 0d 69 6e 74 20 54 69 74 |ht.c */.|.int Tit|
|00004d50| 6c 65 42 61 72 48 65 69 | 67 68 74 28 57 69 6e 64 |leBarHei|ght(Wind|
|00004d60| 6f 77 50 74 72 20 77 69 | 6e 64 6f 77 29 3b 0d 0d |owPtr wi|ndow);..|
|00004d70| 2f 2a 20 54 72 61 70 41 | 76 61 69 6c 61 62 6c 65 |/* TrapA|vailable|
|00004d80| 2e 63 20 2a 2f 0d 0d 42 | 6f 6f 6c 65 61 6e 09 54 |.c */..B|oolean.T|
|00004d90| 72 61 70 41 76 61 69 6c | 61 62 6c 65 28 73 68 6f |rapAvail|able(sho|
|00004da0| 72 74 20 74 68 65 54 72 | 61 70 29 3b 0d 0d 2f 2a |rt theTr|ap);../*|
|00004db0| 20 55 6e 69 66 6f 72 6d | 2e 63 20 2a 2f 0d 0d 64 | Uniform|.c */..d|
|00004dc0| 6f 75 62 6c 65 20 55 6e | 69 66 6f 72 6d 53 61 6d |ouble Un|iformSam|
|00004dd0| 70 6c 65 28 76 6f 69 64 | 29 3b 0d 0d 2f 2a 20 56 |ple(void|);../* V|
|00004de0| 42 4c 49 6e 74 65 72 72 | 75 70 74 53 65 72 76 69 |BLInterr|uptServi|
|00004df0| 63 65 52 6f 75 74 69 6e | 65 20 2a 2f 0d 73 74 72 |ceRoutin|e */.str|
|00004e00| 75 63 74 20 56 42 4c 54 | 61 73 6b 41 6e 64 41 35 |uct VBLT|askAndA5|
|00004e10| 20 7b 0d 20 20 20 20 76 | 6f 6c 61 74 69 6c 65 20 | {. v|olatile |
|00004e20| 56 42 4c 54 61 73 6b 20 | 76 62 6c 3b 0d 20 20 20 |VBLTask |vbl;. |
|00004e30| 20 6c 6f 6e 67 20 6f 75 | 72 41 35 3b 0d 20 20 20 | long ou|rA5;. |
|00004e40| 20 76 6f 69 64 20 28 2a | 73 75 62 72 6f 75 74 69 | void (*|subrouti|
|00004e50| 6e 65 29 28 73 74 72 75 | 63 74 20 56 42 4c 54 61 |ne)(stru|ct VBLTa|
|00004e60| 73 6b 41 6e 64 41 35 20 | 2a 76 62 6c 44 61 74 61 |skAndA5 |*vblData|
|00004e70| 29 3b 0d 20 20 20 20 47 | 44 48 61 6e 64 6c 65 20 |);. G|DHandle |
|00004e80| 64 65 76 69 63 65 3b 0d | 20 20 20 20 6c 6f 6e 67 |device;.| long|
|00004e90| 20 73 6c 6f 74 3b 0d 20 | 20 20 20 76 6f 6c 61 74 | slot;. | volat|
|00004ea0| 69 6c 65 20 6c 6f 6e 67 | 20 6e 65 77 46 72 61 6d |ile long| newFram|
|00004eb0| 65 3b 09 09 09 09 2f 2f | 20 42 6f 6f 6c 65 61 6e |e;....//| Boolean|
|00004ec0| 0d 20 20 20 20 76 6f 6c | 61 74 69 6c 65 20 6c 6f |. vol|atile lo|
|00004ed0| 6e 67 20 66 72 61 6d 65 | 73 4c 65 66 74 3b 09 09 |ng frame|sLeft;..|
|00004ee0| 09 2f 2f 20 63 6f 75 6e | 74 20 64 6f 77 6e 20 74 |.// coun|t down t|
|00004ef0| 6f 20 7a 65 72 6f 0d 20 | 20 20 20 6c 6f 6e 67 20 |o zero. | long |
|00004f00| 66 72 61 6d 65 73 44 65 | 73 69 72 65 64 3b 0d 20 |framesDe|sired;. |
|00004f10| 20 20 20 54 69 6d 65 72 | 20 2a 66 72 61 6d 65 54 | Timer| *frameT|
|00004f20| 69 6d 65 72 3b 09 09 09 | 09 09 2f 2f 20 74 69 6d |imer;...|..// tim|
|00004f30| 65 20 6d 73 20 73 69 6e | 63 65 20 6c 61 73 74 20 |e ms sin|ce last |
|00004f40| 56 42 4c 20 69 6e 74 65 | 72 72 75 70 74 2c 20 73 |VBL inte|rrupt, s|
|00004f50| 65 65 20 54 69 6d 65 72 | 2e 63 0d 20 20 20 20 76 |ee Timer|.c. v|
|00004f60| 6f 69 64 20 2a 70 74 72 | 3b 09 09 09 09 09 09 09 |oid *ptr|;.......|
|00004f70| 2f 2f 20 75 73 65 20 74 | 68 69 73 20 66 6f 72 20 |// use t|his for |
|00004f80| 77 68 61 74 65 76 65 72 | 20 79 6f 75 20 77 61 6e |whatever| you wan|
|00004f90| 74 0d 7d 3b 0d 74 79 70 | 65 64 65 66 20 73 74 72 |t.};.typ|edef str|
|00004fa0| 75 63 74 20 56 42 4c 54 | 61 73 6b 41 6e 64 41 35 |uct VBLT|askAndA5|
|00004fb0| 20 56 42 4c 54 61 73 6b | 41 6e 64 41 35 3b 0d 0d | VBLTask|AndA5;..|
|00004fc0| 4f 53 45 72 72 20 56 42 | 4c 49 6e 73 74 61 6c 6c |OSErr VB|LInstall|
|00004fd0| 28 56 42 4c 54 61 73 6b | 41 6e 64 41 35 20 2a 76 |(VBLTask|AndA5 *v|
|00004fe0| 62 6c 44 61 74 61 2c 47 | 44 48 61 6e 64 6c 65 20 |blData,G|DHandle |
|00004ff0| 64 65 76 69 63 65 2c 69 | 6e 74 20 66 72 61 6d 65 |device,i|nt frame|
|00005000| 73 29 3b 0d 4f 53 45 72 | 72 20 56 42 4c 52 65 6d |s);.OSEr|r VBLRem|
|00005010| 6f 76 65 28 56 42 4c 54 | 61 73 6b 41 6e 64 41 35 |ove(VBLT|askAndA5|
|00005020| 20 2a 76 62 6c 44 61 74 | 61 29 3b 0d 76 6f 69 64 | *vblDat|a);.void|
|00005030| 20 56 42 4c 49 6e 74 65 | 72 72 75 70 74 53 65 72 | VBLInte|rruptSer|
|00005040| 76 69 63 65 52 6f 75 74 | 69 6e 65 28 76 6f 69 64 |viceRout|ine(void|
|00005050| 29 3b 0d 76 6f 69 64 20 | 53 69 6d 70 6c 65 56 42 |);.void |SimpleVB|
|00005060| 4c 53 75 62 72 6f 75 74 | 69 6e 65 28 56 42 4c 54 |LSubrout|ine(VBLT|
|00005070| 61 73 6b 41 6e 64 41 35 | 20 2a 76 62 6c 44 61 74 |askAndA5| *vblDat|
|00005080| 61 29 3b 0d 0d 2f 2a 20 | 56 69 64 65 6f 54 46 42 |a);../* |VideoTFB|
|00005090| 2e 63 20 2a 2f 0d 0d 42 | 6f 6f 6c 65 61 6e 20 54 |.c */..B|oolean T|
|000050a0| 46 42 49 6e 53 6c 6f 74 | 28 69 6e 74 20 73 6c 6f |FBInSlot|(int slo|
|000050b0| 74 29 3b 0d 76 6f 69 64 | 09 53 65 74 55 70 54 46 |t);.void|.SetUpTF|
|000050c0| 42 28 69 6e 74 20 73 6c | 6f 74 29 3b 0d 76 6f 69 |B(int sl|ot);.voi|
|000050d0| 64 09 52 61 6d 70 43 6c | 75 74 54 46 42 28 69 6e |d.RampCl|utTFB(in|
|000050e0| 74 20 73 6c 6f 74 29 3b | 0d 76 6f 69 64 09 47 72 |t slot);|.void.Gr|
|000050f0| 61 79 43 6c 75 74 54 46 | 42 28 69 6e 74 20 73 6c |ayClutTF|B(int sl|
|00005100| 6f 74 29 3b 0d 76 6f 69 | 64 09 4c 6f 61 64 43 6c |ot);.voi|d.LoadCl|
|00005110| 75 74 54 46 42 28 69 6e | 74 20 73 6c 6f 74 2c 75 |utTFB(in|t slot,u|
|00005120| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 20 72 67 62 |nsigned |char rgb|
|00005130| 5b 32 35 36 5d 5b 33 5d | 29 3b 0d 76 6f 69 64 09 |[256][3]|);.void.|
|00005140| 4e 65 77 42 6c 61 6e 6b | 69 6e 67 54 46 42 28 69 |NewBlank|ingTFB(i|
|00005150| 6e 74 20 73 6c 6f 74 29 | 3b 0d 76 6f 69 64 09 4e |nt slot)|;.void.N|
|00005160| 65 77 46 69 65 6c 64 54 | 46 42 28 69 6e 74 20 73 |ewFieldT|FB(int s|
|00005170| 6c 6f 74 29 3b 0d 69 6e | 74 09 09 42 6c 61 6e 6b |lot);.in|t..Blank|
|00005180| 69 6e 67 54 46 42 28 69 | 6e 74 20 73 6c 6f 74 29 |ingTFB(i|nt slot)|
|00005190| 3b 0d 76 6f 69 64 09 53 | 65 74 44 65 70 74 68 54 |;.void.S|etDepthT|
|000051a0| 46 42 28 69 6e 74 20 73 | 6c 6f 74 2c 73 68 6f 72 |FB(int s|lot,shor|
|000051b0| 74 20 69 6e 74 20 62 69 | 74 73 29 3b 0d 76 6f 69 |t int bi|ts);.voi|
|000051c0| 64 09 53 79 6e 63 68 53 | 65 74 44 65 70 74 68 54 |d.SynchS|etDepthT|
|000051d0| 46 42 28 69 6e 74 20 6d | 61 73 74 65 72 53 6c 6f |FB(int m|asterSlo|
|000051e0| 74 2c 69 6e 74 20 73 6c | 6f 74 2c 73 68 6f 72 74 |t,int sl|ot,short|
|000051f0| 20 69 6e 74 20 62 69 74 | 73 29 3b 0d 76 6f 69 64 | int bit|s);.void|
|00005200| 09 53 79 6e 63 68 54 6f | 4d 61 69 6e 44 65 76 69 |.SynchTo|MainDevi|
|00005210| 63 65 54 46 42 28 47 44 | 48 61 6e 64 6c 65 20 64 |ceTFB(GD|Handle d|
|00005220| 65 76 69 63 65 29 3b 0d | 76 6f 69 64 09 48 61 6c |evice);.|void.Hal|
|00005230| 74 54 46 42 28 69 6e 74 | 20 73 6c 6f 74 29 3b 0d |tTFB(int| slot);.|
|00005240| 76 6f 69 64 09 52 65 73 | 74 61 72 74 54 46 42 28 |void.Res|tartTFB(|
|00005250| 69 6e 74 20 73 6c 6f 74 | 2c 73 68 6f 72 74 20 69 |int slot|,short i|
|00005260| 6e 74 20 62 69 74 73 29 | 3b 0d 76 6f 69 64 09 48 |nt bits)|;.void.H|
|00005270| 61 6c 74 44 65 76 69 63 | 65 54 46 42 28 47 44 48 |altDevic|eTFB(GDH|
|00005280| 61 6e 64 6c 65 20 64 65 | 76 69 63 65 29 3b 0d 76 |andle de|vice);.v|
|00005290| 6f 69 64 09 52 65 73 74 | 61 72 74 44 65 76 69 63 |oid.Rest|artDevic|
|000052a0| 65 54 46 42 28 47 44 48 | 61 6e 64 6c 65 20 64 65 |eTFB(GDH|andle de|
|000052b0| 76 69 63 65 29 3b 0d 76 | 6f 69 64 09 53 63 72 6f |vice);.v|oid.Scro|
|000052c0| 6c 6c 54 46 42 28 69 6e | 74 20 73 6c 6f 74 2c 73 |llTFB(in|t slot,s|
|000052d0| 68 6f 72 74 20 69 6e 74 | 20 62 69 74 73 2c 6c 6f |hort int| bits,lo|
|000052e0| 6e 67 20 78 2c 6c 6f 6e | 67 20 79 29 3b 0d 76 6f |ng x,lon|g y);.vo|
|000052f0| 69 64 09 50 61 6e 54 46 | 42 28 69 6e 74 20 73 6c |id.PanTF|B(int sl|
|00005300| 6f 74 2c 6c 6f 6e 67 20 | 69 6e 74 20 78 29 3b 0d |ot,long |int x);.|
|00005310| 0d 2f 2a 20 56 4c 61 6d | 62 64 61 2e 63 20 2a 2f |./* VLam|bda.c */|
|00005320| 0d 0d 64 6f 75 62 6c 65 | 20 56 4c 61 6d 62 64 61 |..double| VLambda|
|00005330| 28 64 6f 75 62 6c 65 20 | 6e 6d 29 3b 0d 64 6f 75 |(double |nm);.dou|
|00005340| 62 6c 65 20 56 4c 61 6d | 62 64 61 50 72 69 6d 65 |ble VLam|bdaPrime|
|00005350| 28 64 6f 75 62 6c 65 20 | 6e 6d 29 3b 0d 0d 2f 2a |(double |nm);../*|
|00005360| 20 5a 6f 6f 6d 2e 63 20 | 2a 2f 0d 0d 76 6f 69 64 | Zoom.c |*/..void|
|00005370| 20 5a 6f 6f 6d 28 57 69 | 6e 64 6f 77 50 74 72 20 | Zoom(Wi|ndowPtr |
|00005380| 74 68 65 57 69 6e 64 6f | 77 2c 69 6e 74 20 7a 6f |theWindo|w,int zo|
|00005390| 6f 6d 44 69 72 29 3b 0d | 0d 0d 23 65 6e 64 69 66 |omDir);.|..#endif|
|000053a0| 20 5f 56 49 44 45 4f 54 | 4f 4f 4c 42 4f 58 5f 0d | _VIDEOT|OOLBOX_.|
|000053b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000053f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005400| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00005410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005420| 00 00 00 00 00 11 13 00 | 00 00 02 b6 08 44 65 66 |........|.....Def|
|00005430| 0e 56 69 64 65 6f 54 6f | 6f 6c 62 6f 78 2e 68 6c |.VideoTo|olbox.hl|
|00005440| 02 00 00 00 54 45 58 54 | 4b 41 48 4c 00 00 00 00 |....TEXT|KAHL....|
|00005450| 00 00 54 45 58 54 4b 41 | 48 4c 00 00 00 00 00 00 |..TEXTKA|HL......|
|00005460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005470| 00 00 a7 e5 d5 d7 00 00 | 00 00 00 00 01 ac 00 00 |........|........|
|00005480| 00 00 00 00 00 05 13 00 | 00 00 02 d3 00 00 00 00 |........|........|
|00005490| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 06 13 00 |........|........|
|000054a0| 00 00 02 e8 09 43 6f 6c | 6c 61 74 7a 2e 6d 00 00 |.....Col|latz.m..|
|000054b0| 00 00 00 00 00 08 13 00 | 00 00 02 f5 08 4d 61 73 |........|.....Mas|
|000054c0| 74 65 72 2e 6d 00 00 00 | 00 00 00 00 00 09 13 00 |ter.m...|........|
|000054d0| 00 00 03 12 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000054e0| 00 00 00 00 00 0a 13 00 | 00 00 03 1f 00 00 00 00 |........|........|
|000054f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 0b 13 00 |........|........|
|00005500| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 0a 69 64 |...H..Mo|naco..id|
|00005510| 00 00 00 00 00 00 00 90 | 00 01 ff 9c 00 58 00 09 |........|.....X..|
|00005520| 00 58 02 0a 00 84 00 06 | 00 04 00 29 00 07 01 6a |.X......|...)...j|
|00005530| 01 3e 00 29 00 07 01 6a | 01 3e a7 bc 57 51 00 00 |.>.)...j|.>..WQ..|
|00005540| 03 78 00 00 08 7e 00 00 | 02 8c 01 00 00 00 00 1e |.x...~..|........|
|00005550| 00 29 00 07 01 6a 01 3e | 00 29 00 07 01 6a 01 3e |.)...j.>|.)...j.>|
|00005560| 00 00 02 8c 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005570| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 4b |.....n..|.n...>.K|
|00005580| 50 d8 15 ac 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |P.......|.>..MPSR|
|00005590| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|000055a0| 03 f0 ff ff 00 00 00 4c | 00 4d 4e c0 00 00 00 00 |.......L|.MN.....|
|000055b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000055f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+